Adds Socket::transform and Socket::restore.

Like I recommended in the `zmq` module, I want an easy hook to be able to add rich data types like [structured clone](https://github.com/tessel/structured-clone) into message passing.

This adds the optional socket methods Socket::transform and Socket::restore which, if implemented, call those functions to encode and decode a buffer according to the implementation.

If they are not implemented, it's a noop.