Add support for rocksdb

TODO: DRY leveldb and rocksdb implementation, there's a lot in common