cleanup: only look for the capabilities we care about in tests
This used to be done with globs, but old versions of hg don't sort
capabilities and recent ones do. Just build a filter and apply it
everywhere we check capabilities. As a bonus, what we're looking for
is now easier to spot in the output.
Differential Revision: https://phab.mercurial-scm.org/D4559