xenapi: glance plugin should close connections

Current the xenapi glance plugin does not close
httplib connections when exceptions are raised.

Note this code is run under python 2.4 so with
is not available.

Fixes bug 1197846

Change-Id: I5cfb067320e7506109c301532a95fe83aa4fd0f9
Merge "xenapi: glance plugin should close connections"