move callbacks out to their own trait

this reduces the amount of things users have to worry about
reimplementing, since we don't have associated items yet
propagate a few more errors
handle errors a bit more properly here
more error handling
the default PING implementation should reply with PONG
pass is_reply through to the message type
add callbacks for on_command and on_reply
limit messages to 512 bytes

still need to avoid actually reading in bytes past 512 in an incoming
message