refactor for support multiple api, add test framework
base leveldb usage included.
implemented and tested leveldb database backend.