Store the next available id in redis.

This prevents overwriting old vectors when reopening an LSH store.
Raise exception when an id collision occurs.
Allow turning redis caching on and off.

This also changes the name of the cache, and makes both properties
accessible.