revset: fix wrong keyword() behaviour for strings with spaces

Some changesets can be wrongly reported as matched by this predicate
due to searching in a string joined with spaces and not individually.
A test case added, which fails without this fix.

--HG--
branch : stable
extra : rebase_source : d76569e7bf994558f1aadaea16cc6932293aa27c
hgweb: add string constants for search mode names

It helps detecting mistakes in the mode names.
hgweb: import the whole util module in webcommands instead of just one function

This is to allow using other functions from this module easily.
workingctx: remove unneeded __repr__ since it is now inherited
workingctx: remove unneeded manifest since it is now inherited
basefilectx: use basectx __str__ instead of duplicating logic

This change allows us to only rely on one place to convert a context to a
string which will help eliminate duplicate code in context.py
workingfilectx: remove __str__ manifest since it is now inherited
workingfilectx: remove bogus comment
workingfilectx: remove unneeded __repr__ since it is now inherited
commitablectx: add a class that will be used as a parent of mutable contexts

Currently, we have basectx that serves as a common ancestor of all contexts. We
will now add a new class commitablectx that will inherit from basectx and will
serve as a common place for code that will be shared between mutable contexts,
e.g. workingctx and memctx.
commitablectx: move __init__ from workingctx
commitablectx: move __str__ from workingctx
commitablectx: move __nonzero__ from workingctx
commitablectx: move __contains__ from workingctx
commitablectx: move _buildflagfunc from workingctx
commitablectx: move _flagfunc from workingctx
commitablectx: move _manifest from workingctx
commitablectx: move _status from workingctx
commitablectx: move status from workingctx
commitablectx: move _user from workingctx