tags: introduce _readtaghist function

The existing _readtags function has been modified a little and renamed
_readtaghist. A new _readtaghist function has been added, which is a wrappger
around _readtaghist. Its output is the same as the old _readtaghist.

The purpose of this change is to make it possible to automatically merge tag
files. In order to do so we will need to get the line numbers for each of the
tag-node pairs on the first merge parent.

This is not used yet, but will be used on a follow up patch that will introduce
an automatic tag merge algorithm.

I performed some tests to compare the effect of this change. I used timeit to
run the test-tags.t test a 9 times with and without this patch. The results
were:

- without this patch: 3 loops, best of 3: 8.55 sec per loop
- with this patch:    3 loops, best of 3: 8.49 sec per loop

The the test was on average was slightly faster with this patch (although the
difference was probably not statistically significant).
revset: replace _missingancestors optimization with only revset

(::a - ::b) is equivalent to only(a, b).
revset: remove no longer used _missingancestors revset

This was undocumented.
context: extend efficient manifest filtering to when all paths are files

On a repository with over 250,000 files and 700,000 commits, this improves
cases like

hg status --rev <rev> -- <file>  # rev is not .

from 2.1 seconds to 1.4 seconds.

There is further scope for improvement here: for a single file or a small set
of files, it is probably more efficient to use filelog linkrevs when possible.
However there will always be cases where that will fail (multiple commits
pointing to the same file revision, removed files...), so this is independently
useful.
templatekw: add 'currentbookmark' keyword to show current bookmark easily

Before this patch, complicated template expression below is required
to show current active bookmark if it is associated with the
changeset.

    "{bookmarks % '{ifeq(bookmark, current, \"{bookmark}\")}'}"

This patch add 'currentbookmark' keyword to show current bookmark
easily.
templatekw: add 'subrepos' keyword to show updated subrepositories

'subrepos' template keyword newly added by this patch shows updated
subrepositories.

For the compatibility with the list of subrepositories shown in the
editor at commit:

  - 'subrepos' is empty, at revisions removing '.hgsub' itself

  - 'subrepos' is calculated between the revision and the first parent
    of it, at merge revisions

To avoid silent regression, this patch also confirms "hg diff" of
".hgsubstate" and parents for each target revisions in the test.