Return None from get_swap() if input is not swap

If a non-swap parameter is passed to get_swap(), return None,
rather than returning the parameter itself.

Change-Id: Icfb0eb0e4d721522160d0b7a4fd9b98c1871a10a
Closes-bug: #1214406
Fixes server list filtering on metadata

In order to specify filtering of returned servers based on
metadata or system metadata a key/value pair string is passed to
the API. However, the string is never converted to a separate
key/value dictionary. This results in the db failing to filter
correctly and causes a stack trace.

This change correctly converts the string values for system
metadata and metadata to dictionaries and fixes the compute api
unittests which previously erroneously assumed that the compute
api layer would be passed search opts in dict format when
required.

Change-Id: I886d5e770fe16fc2194b33c563a131b550f13f59
Closes-Bug: 1372218
Return vcpu pin set as set rather than list

The current implementation of the libvirt driver makes mixed assumptions
about the vcpu pin set returned from hardware.get_vcpu_pin_set(). Most
places in the code assume its a set and perform set operations on the
structure. However a few  places assume it's a list. Given the mixed
assumptions about the structure type, the existing code was trying
to perform set operations on a list.

This patch changes the get_vcpu_pin_set() method to return a set
rather than a list and handles any edge cases where consumers need
a list. It also updates any relevant unit tests accordingly.

Change-Id: I66d5cbc0e2d370d9d2d2ab2bad2c5b348bedba6c
Closes-Bug: 1372829
add time to logging in unit tests

It's quite difficult to debug unit test failures when you don't have
any idea when the log messages happened relative to each other. Update
the logging fixture so that we are actually writing out time into our
log messages.

Change-Id: I704792f10d77345246d528bd9abf2e0c46b6df72
Merge "add time to logging in unit tests"
Merge "Return None from get_swap() if input is not swap"
Merge "Return vcpu pin set as set rather than list"
Merge "Fixes server list filtering on metadata"