Adds "on connection added" functor to ManagedConnections

Also adds test case for it
Nice one Peter