Use Instance.get_flavor() in more places

This helper was introduced a while back, but not everything is using it.
In order to make the transition in the next patch easier, this cleans
up those cases to use the helper. Unfortunately, there was a lot of
cruft in the tests where non-objects were being passed to these areas,
so this change looks larger than it really is.

Related to blueprint flavor-from-sysmeta-to-blob

Change-Id: I456fd94e21c71f10dff63997046a842345078071
Merge "Use Instance.get_flavor() in more places"