Features/issue 223

Initial implementation of more flexible statmetric messages that can expose metrics data in message fields instead of as a payload string. Lots of test code written, but deactivated until such time as #119 is closed.