Add tests for handling deferred cancellation and also cancelling the deferred returned to klein by the handler if the connection is lost.