revlog: add a fast method for getting a list of chunks

This moves _chunkraw into the loop. Doing that improves revlog decompression --
in particular, manifest decompression -- significantly. For a 20 MB manifest
which is the result of a > 40k delta chain, hg perfmanifest improves from 0.55
seconds to 0.49 seconds.

--HG--
extra : rebase_source : 11a574ba198d58eb3851e45a820e91033596b85d
revlog.revision: fix cache preload for inline revlogs

Previously the length of data preloaded did not account for the interleaved io
contents. This meant that we'd sometimes have cache misses in _chunks despite
the preloading.

Having a correctly filled out cache will become essential in an upcoming patch.

--HG--
extra : rebase_source : 736c196852faaef1b77f1ce486a7d08a7dc4c27e
revlog._chunks: inline getchunk

We do this in a somewhat hacky way, relying on the fact that our sole caller
preloads the cache right before calling us. An upcoming patch will make this
more sensible.

For a 20 MB manifest with a delta chain of > 40k, perfmanifest goes from 0.49
seconds to 0.46.

--HG--
extra : rebase_source : 0942b134a4be7bd783f7d95696dd71c5410010b4
revlog: move chunk cache preload from revision to _chunks

In case we don't have a cached text already, add the base rev to the list
passed to _chunks. In the cached case this also avoids unnecessarily preloading
the chunk for the cached rev.

--HG--
extra : rebase_source : cf3c49fd4142a7373271541d29ec6b8da743a823
revlog: remove _chunkbase since it is no longer used

This was introduced in 2011 for the lwcopy feature but never actually got used.
A similar hook can easily be reintroduced if needed in the future.

--HG--
extra : rebase_source : 954c2108f70e1f663fd48fe86b683ec2c0e6a261
parsers: use a lookup table to convert hex to binary

This is a hotspot for parse_manifest. With this patch, for a 20 MB, 200,000
file manifest, parse_manifest goes down from 0.153 seconds to 0.116.

--HG--
extra : rebase_source : 4314d861f4c6e07d2fe79193f551ff1d089982e7