Replacing broken small_indexed_storage impl.
Fixes crashes
Fixing race condition resulting in block forever with very quick query results
Fixed memory leak