Added tests for CollectdPacketDecoder

Also, reworked CollectdPacketDecoder a bit