revlog: add a _datareadfp context manager for data access needs
The helper handles:
1) is there a file handle already open that we shall just reuse,
2) is the revlog inlined or not.
Using a context manager for all read access will help setting up file pointer
caching in later changesets.
To run the tests, do:
cd tests/
python run-tests.py
See https://mercurial-scm.org/wiki/WritingTests for
more information on writing tests.