WIP (persistent)

add simple interfaces for persistent, using leveldb
TODO: sync instance tomorrow
Merge pull request #86 from yifan-gu/persistent

WIP (persistent)