Treat instance like an object in _prebuild_instance

The _prebuild_instance method is given an instance object
but was treating it like a primitive dict, so this change
uses dot notation to enforce the object usage.

Adds unit tests since this wasn't directly unit tested
before.

Part of blueprint compute-manager-objects-juno

Change-Id: Id22eb46ed3b4bd8fb48189a40f9df9bb114cd3d4
Merge "Treat instance like an object in _prebuild_instance"