BDM class and transformation functions

This patch adds the utility functions that will help us switch
between versions of block device mapping data.

In order to accomplish this, and to have a more structured approach to
dealing with block device mapping data in the future, this patch
introduces a BlockDeviceDict class which is a thin wrapper around a
standard dict that makes it easier to reason about which fields are
present in the dictionary, and introduces said conversion routines.

blueprint: improve-block-device-handling

Change-Id: I9370333059b8c9aaf92010470b8475a913d329b2
DB migration to the new BDM data format

This patch migrates the DB to the new data format. In addition it also
utilizes routines introduced in the change
I9370333059b8c9aaf92010470b8475a913d329b2 in a way that will allow us
to transition into using the new data in Nova logic one step at a time.

This is accomplished in a following manner in the DB/conductor layer,
which is supposed to allow for subsequent changes to be as granular as
possible:

* Read operations - data is always read as is found in the DB - meaning
in the new format, and transformed after every call. This will allow us
to make granular changes in the API/Compute layers.

* Data is converted inside the DB methods that do writes, and an
additional 'legacy' flag is added (set to True by default). It is up to
the calling method to make sure it supplies the DB layer with the format
it is intending to write, to avoid guessing.

This patch also fixes some of the block device fixtures in tests, when it was
required to be aware of the new data structure (mostly when mocking DB
methods that return the new data format).

This patch is not supposed to provide any new functionality to Nova.

blueprint: improve-block-device-handling

Change-Id: If30afdb59d4c4268b97d3d10270df2cc729a0c4c
Create an image BDM for every instance

This patch makes every boot create a block device mapping if the
instance was started with an image.

These block devices are not used anywhere at the moment but will be used
in the future as part of a more flexible block device API.

This patch also makes sure they are deleted once the instance is deleted
as well.

Change-Id: Ia89d531be71c460f1f82fcfce34b270639a23061
blueprint: improve-block-device-handling