revlog: use LRU for the chain cache
For a large repository, this reduces the number of filelog instances and
associated data a lot. For a 1% speed penalty, it reduces peak RSS by
20% for the full NetBSD test repository.
Differential Revision: https://phab.mercurial-scm.org/D9235
To run the tests, do:
cd tests/
python run-tests.py
See https://mercurial-scm.org/wiki/WritingTests for
more information on writing tests.