Fix an error in compute api snapshot_volume_backed bdm code

Stumbled upon an error similar to the one found in
https://review.openstack.org/#/c/23354/ where a dbm dict
item is tried to be read as an attribute.

Looked at the next couple of lines and discovered more
cases of this error.

Updates to some api tests that contain faulty fakes that
hide this error adds some coverage for this error. Rebased
this patch on the above mentioned review to be able to
change the tests, since the code path is the same and they
now hit both of these errors.

Resolves bug 1142734.

Change-Id: Ie639cd483334b6222085a139159da47ce6fa3671
Merge "Fix an error in compute api snapshot_volume_backed bdm code"