Many improvements to the commands system. See commit info for details.

* Added UnknownCommand event, can be cancelled if further processing as a message should not continue
* Replaced (bool, None/Exception) returns so the first tuple item is part of the CommandState enum
* Shifted responsibility for relaying different command states to the protocols
* Updated unit tests