Added logging + refactored "own messages"

Refactored "own messages" to allow the same type of interaction in the
code as is there for all the other message types (old messages, new
messages). Closes #17.

Also added a logging feature that keeps a database log of actions
take on the system. This clutters the code a bit but provides
a good source for evaluation and metrics on the system for the
testing phase.