client: use contextlib to manage broker connections

Change-Id: I67e0beb40a4b56612469a845d7371cd9cdb4a8cd
Signed-off-by: Greg Padgett <gpadgett@redhat.com>