Improve error handling in libvirt driver

Libvirt defaults to outputting errors on stderr in addition to being
raised. Furthermore some libvirt exceptions for failed lookups can
safely be ignored while others should be re-raised and then as a
NovaException.

Included in this fix:

- Replace default error handler to defer outputting on strerr.
- Fix unhandled exceptions in list_instance_uuids and
  get_memory_mb_used.
- While fixing list_instance_uuids, this change also removes an
  unnecessary extra lookup for every instance.
- Centralize libvirt exception handling in new method _lookup_by_id.
- Improve test coverage for list_instances and list_instance_uuids.

Resolves bug 1182184.

Change-Id: If946f9d05388c93c0630d454e5ca3b6625bb14f9