localrepo: add hook point to invalidate everything on each command-server run

MQ extension will wrap this function to invalidate its state.

repo.invalidate cannot be wrapped for this purpose because qpush obtains
repo.lock in the middle of the operation, triggering repo.invalidate.  Also,
it seems wrong to obtain lock earlier because mq data is non-store parts.
cmdserver: reload mq on each runcommand request to avoid corruption

If mq was changed by another process, command server should invalidate caches.
Otherwise, mq status would go wrong.
cmdserver: recreate mq object on runcommand in case queue path was changed

repo.mq needs to be recreated after queue path change.  Since there is little
benefit to keep invalidated mq object, it always delete repo.mq.
cmdserver: include non-zero return code of runcommand in test output
cmdserver: mask return code of runcommand in the same way as dispatch.run

"hg help" does not state that the code for abort is 255, but it's confusing
to have different code between hg command and command server.

Tests of python-hglib 1.2 passed with this change.
dirstate: remove double imports of errno
paper: overlapping of section title on help pages (issue4051)

Now there will be no overlap lines between various section title
on help pages. http://selenic.com/repo/hg/help/config

--HG--
branch : stable
phase: say "Returns 0" instead of "Return 0" like other command help

--HG--
branch : stable
revset: changed generatorset code to remove unnecesary function call

Removed _nextitem() method, now __iter__ has that logic and __contains__ uses
__iter__ to check for membership.
merge with stable