Adds on_close_ handler to Connection

This is a part of refactoring to make the Connection
class not be aware about classes above it (such as
Transport or ConnectionManager).
Removes the failure_functor from Connection

It's been replaced with the OnConnect and OnClose functors.