Initial Implementation

Ported from https://github.com/zeromq/libzmq/blob/8cda54c52b08005b71f828243f22051cdbc482b4/src/zmq_utils.cpp#L77-L168
Add tests
Clean up tests a little
Don't decode invalid strings