new pouchdb
more event and db cleanup
add offline checking library
offline mode handling, database sync implemented