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
bundle: fix performance regression when bundling file changes (issue4031)

Somewhere before 2.7, a change [ec896f9e8894] was committed that
entailed a large performance regression when bundling (and therefore
remote cloning) repositories. For each file in the repository, it would
recompute the set of needed changesets even though it is the same for
all files. This computation would dominate bundle runtimes according to
profiler output (by 10x or more).

--HG--
branch : stable
extra : rebase_source : 3072cf998416fb8d3cd37e471eb83a0649253d3c
extra : amend_source : 52043bcbfa4b682a764787ff12913b0eef73f72b