Move [de]serialization code into a separate CrtAuthCodec class

* Somewhat improved testing
* MiniMessagePack now throws RuntimeException instead of Error when
 when failing to write to an ByteArrayOutputStream