xenapi: Use netuils.get_injected_network_template

The Xen driver duplicates quite a bit of code used to inject the `interfaces`
template into the guest.

This patch makes the Xen driver use the generic `netutils` version.

Parameter defaults were moved from the signature into the method since in the
original code, you wouldn't be able to override them due to their value being
populated at import-time, not run-time.

Change-Id: I4cd1631b8e6ec2dc3fae1f8eb0362aecead53f1e
Do not process events for instances without host

In some cases Neutron might send events such as 'VIF unplugged'
for instances which are either being deleted or shelved. When
that happens there will be a failure in dispatching the event
to the appropriate compute node - as there is no host for the
instance.

As multiple neutron events can be stashed in a single call
it is important to avoid that this kind of errors will prevent
processing of other events in the same call.

This patch does not process events for instances without a host,
marking them as failed.

When the above condition occurs, the create event request will
return a 207 response code. For specific events, a 422
unprocessable entity code will be set.

This patch also preserve the characteristic that events are
returned in the response in the same order they were found in
the request.

Change-Id: I18062b81e50c722ec96b4296ac39384493683ae3
Closes-Bug: #1333654
Add missing foreign key on pci_devices.compute_node_id

The model specifies a foreign key, but no migrations have ever added it.

Closes-Bug: 1342834
Change-Id: Ia9151b5a7389fbb4c39155f7e192c24bd99e7a9a
Fix last of direct use of object modules

This replaces all uses of nova.objects.<module>.<object> with
nova.objects.<object> in the remaining places.

Implements-Blueprint: object-subclassing

Change-Id: Ic7632cca2455a38abcbdb94feb7e39cfb898bb27
Merge "Add missing foreign key on pci_devices.compute_node_id"
Merge "Fix last of direct use of object modules"
Merge "Do not process events for instances without host"
Merge "xenapi: Use netuils.get_injected_network_template"