Use addOnException to capture server logs on failure
Use addOnException to capture server logs on failure

When a test fails, having access to the server logs can be useful. Add
an addOnException entry which runs add_log_details.

Update add_log_details to use dump_log from Server. Remove the use of
log.info in dump_log so that we can just capture the output and add it
as a test detail.

While we're in there, replace base functional tearDown with addCleanup.
addCleanup will run all cleanups, even if one of them throws an
exception.

Change-Id: I08b98f56ee3295b976d479685c73b3a20f8b5be0

openstack/glance,openstack/glance,openstack/glance