Message types and quality of service are now represented as case classes

This guaranties at type checking time that, at least, those values cannot
be wrong (meaning out of range). En codec has bean implemented specifically
for each one. Now my aim is to try making these codecs into a more generic
one.