Make HttpNamedEndpoint keep shared pointer to connection (PLAT-570)

This makes it possible to avoid segmentation faults in the case where the remote end drops the connection.
Previously it would lead to the connection object being deleted and a dangling pointer.

Mostly relevant to long-running connections that are handled asynchronously.  In the synchronous case the
connection is locked for the duration and recycled afterwards, so it can't cause a problem.