parser: move prettyformat() function from revset module
I want to use it in doctests that I'll add by future patches. Also, it can
be used in "hg debugfileset" command.
fileset: move validation of incomplete parsing to parse() function
fileset.parse() should be responsible for all parsing errors as well.
revset: move validation of incomplete parsing to parse() function
revset.parse() should be responsible for all parsing errors. Perhaps it wasn't
because 'revset.parse' was not a real function when the validation code was
added at
ffcb7e4d719f.