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
Fix typo

Change-Id: I674512d817d44897391e62439e1730bdf89ca9b1
Merge "Do not process events for instances without host"
Merge "xenapi: Use netuils.get_injected_network_template"
Merge "Fix typo"