Create an in-memory index object.
This index object cannot be read/written to the filesystem, but may be used to perform in-memory index operations.
The index must be freed once it's no longer in use.
the pointer for the new index
0 or an error code