Some fixes and a new feature

OpenDbForReadOnly is dependent on https://github.com/facebook/rocksdb/pull/130