Get rid object model `dict` methods part 4

Currently unified object model supports dict-like behavior of objects.
This behavior will be removed in the future so it's necessary to
change Ironic's code to use object attributes as attributes instead of
dictionary keys.

This patch refactors usage of objects in `db` unit tests.

Change-Id: Id7b3a35e7bec67f1b874df13d6e88660991c586f
Partial-Bug: #1256260
Merge "Get rid object model `dict` methods part 4"