Java Gateway API

First PR to extract a Java Gateway API from Insight.

Moved all the connection handling code and some basic methods (e. g. loadContainerHierarchy) from Insight to the Gateway classes.