Improved protocol message handling.
- now protocol message is decoded only once, instead of decoding it everytime when is used
- command handlers now receive pointers to attachments, instead of raw protocol messages