Replaced in-memory datastore with embedded document database (nedb)

* stats are now persisted to disk
* initializing db with dummy data
* refactored api code into separate modules
* updated UI to output more stat details