Moved various constants into enum types

Moved the message ids, message (response/event) codes and some others
into an enum struct that gives a nice stringiser adn a single point of
modification.