Adds "on connection added" functor to ManagedConnections

Also adds test case for it