Implement PBCTransport.get_index for 2i lookups

This is mostly the same code as in the default riak client.