Connection (rebased onto develop)



This is the same as gh-821 but rebased onto develop.

----

Fixing some issues linked to https://trac.openmicroscopy.org.uk/ome/ticket/10480

No ready for review yet. Required to close tickets.