tags: validate nodes in _getfnodes() and update cache in case of unknown nodes

`hgtagsfnodescache` can contain unknown nodes due to cache corruption and this
lead to a traceback on operations like `hg tags` as we don't validate nodes.

This patch validates that all filenodes returned after `hgtagsfnodescache` are
known to the repository. If there exists any unknown filenode, we force
recompute it and update the cache.

The test change demonstrates the fix.

Differential Revision: https://phab.mercurial-scm.org/D10083
13 jobs for topic/default/tags-better in 30 minutes and 45 seconds (queued for 7 seconds)
Status Name Job ID Coverage
  Tests
passed checks-py2 #173143

00:04:33

passed checks-py3 #173144

00:02:45

passed rust-cargo-test-py2 #173145

00:01:40

passed rust-cargo-test-py3 #173146

00:02:41

passed test-py2 #173147

00:14:05

passed test-py2-chg #173153

00:24:50

passed test-py2-pure #173149

00:25:41

passed test-py2-rust #173151

00:26:44

passed test-py3 #173148

00:17:12

passed test-py3-chg #173154

00:09:43

passed test-py3-pure #173150

00:12:44

passed test-py3-rust #173152

00:22:33

 
  Phabricator
passed phabricator-refresh #173155

00:00:31