Remove 'index' code.

It doesn't appear to be used anywhere, so it's one less shared library to deal
with.
Clean up the "tools" extension module.

Interface it directly with numpy arrays, no ctypes pointer encoding/decoding.