Rewrite of persisted message structure

* Persist json matching the user and message models
* Changed valueEncoding of messages to json to enable storing message meta
data such as message direction
* More JSDoc
* Slight stylistic difference between send and received messages
Conversion script for new data structure