[INTERNAL] moved connection pooling to a dedicated class

This should also ensure that we do not fail to close connections that
are established during shutdown.

Change-Id: Ifc6c54db409ffcfe5d99f980fe6af2836409b3b6
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/1639
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>