index: Speed up loading a tree into the index

The index is empty; repeated tree entries cannot collide.

cc github/gitrpc#83