Make index package more self-contained.

Moved interna from diskPersistence into the indexer.
TotalIndexer now called diskIndexer.

Change-Id: I6c8c62cb171f12bbd8a5474773af7786d71ba388
Use a sync.pool for the staging buffer in codec.go.

Change-Id: I1aae6847f77b5a7c75582b07c199b1943cf90552