Add Serializer behaviour and JSON Serializer for WS Transports

Allows custom encoding for WebSocket Messages for clients like
games where encoding performance is vital.
First phase of #484