[connection] move hook control logic on Connection
The _hook_control context manager now operate on connection. We have to keep a
specific entry point in Session to ensure Connection object are properly
cleaned up when using session to "manage" Connection live cycle.
Related to #2503918
raise NotImplementedError("Cannot migrate such an old version. Use intermediate Cubiweb version (try 3.16.x)")