WIP (persistent)

add simple interfaces for persistent, using leveldb
TODO: sync instance tomorrow