Previously, partialmatch belongs to the index object. The index is
more about converting rev to node: index[rev] -> node. The nodemap
object is to convert node to rev: nodemap[node] -> rev. Since
partialmatch is to convert a prefix of node to rev, it's more related to
the nodemap object. So let's move it there logically.
This allows external code to try an alternative nodemap (and partialmatch)
implementation without touching the index object.
Since the C implementation uses a same object for both index and
nodemap, this change does not need to change any of the C code.