parser: allow passing a lookup function to a tokenizer

This will allow us to dynamically handle hyphenated symbols in revsets.
revset: pass a lookup function to the tokenizer
revset: try to handle hyphenated symbols if lookup callback is available

Formerly an expression like "2.4-rc::" was tokenized as 2.4|-|rc|::.
This allows dashes in symbols iff the whole symbol-like string can be
looked up. Otherwise, it's tokenized as a series of symbols and
operators.

No attempt is made to accept dashed symbols inside larger symbol-like
string, for instance foo-bar or bar-baz inside foo-bar-baz.
revrange: pass repo to revset parser

This allows handling of hyphenated symbols for command-line revsets.

--HG--
extra : amend_source : f5ee3d5007c6af8ec43ffcaa3c74ed8e58ac67df