pass in the client to callbacks

this requires run_loop_with to consume the client, since we need to be
able to pass it in mutably. i think that is probably okay.
have the example client respond to PING commands