Clean up for qpid tests

Use the config object in the base class, and define a local
base class for managing connections instead of repeating
that code in several places.

Change-Id: I7816a467da449ba172dbaa23e58b511adc1ba40a