rhg: Port Python’s `ui.configlist` as `Config::get_list`
This new method is not used yet outside of its own unit tests,
so this changeset should make no observable change.
The Rust parser implementation attempts to exactly replicate the behavior of
the Python one, even in edge cases where that behavior is… surprising.
New unit tests capture some of these edge cases.
This started as a line-by-line port. The main changes are:
* Pass around a parser mode enum instead of parser functions
* Inline the whole parser into one function
* Use `[u8]::get` which returns an `Option`,
instead of indexing after explicitly checking the length.
Differential Revision: https://phab.mercurial-scm.org/D11389
#require docutils gettext
$ $TESTDIR/check-gendoc fr
checking for parse errors