[WIP] Tests and msgpack rpc improvements

Includes a commit that should fix #1394, reported by @fwalch