Fix console db can't load attribute pool

Lists consoles failed when populate console_type from console
db's pool attribute. The reason was db api console_get_all_by_instance
didn't join with pool. So add param 'columns_to_join' for db api, and
join pool attribute when lists consoles.

Change-Id: I18b44860270a401c55cf02b4334b973fbf357b03
Closes-bug: #1223205
Get image metadata in to_xml for generating xml

The to_xml method of libvirt driver will generate xml file of instance
during hard reboot/spawn/rescue/migrate and other operations, and the
image_meta is used for generating correct xml of instance.
But the accurate image_meta may not be passed into the get_guest_config,
so some configs related to the image_meta will be lost, we need to get the
image metadata if it is not passed to the to_xml method.

Fixes bug 1206809
Change-Id: I6942837905334a652cda64d7dd41d3b575846d93
Merge "Fix console db can't load attribute pool"
Merge "Get image metadata in to_xml for generating xml"