Add support for parallel operations in LevelDB API.

This means that a single thread could now create read snapshots, write
batches and run single operations in a reasonable way.