(#1549) - index method for plugins

Adds a new index() API for plugins to access
in order to store additional metadata.

This API is specifically designed for Map/Reduce,
since in order to persist its data it requires
a secondary index not normally exposed by the
adapter API.