Enforce query order for getting VIFs by instance

When spawn VM with multiple nics, during the phase of VM network allocations
using nova-network, the networks pass into driver layer will get reordered
by vifs queried by instance. We have to enforce the query order with vif
creation order rather than rely on the database backend's order.

Change-Id: I51333cc82c03e20d89d3ea548ff164fe71b5ba26
Payload meta_data is empty when remove metadata

When update metadata for a host aggregation, all of the values will
be in the variable of "updates", if remove metadata, the format would
be {"foo": None, "bar": None}; If adding metadata, the format would
be {"foo": "foo1", "bar": "bar1"}.

The current logic of update_metadata() is as following:
1) Get all metadata from variable "updates".
2) Traverse updates to see which values are new added and which needs
to be removed. For the new added values, put the metadata to
variable "to_add"; for the values which need to be removed, just
remove them from metadata.
3) Set the values of variable "to_add" as payload metadata.

The above logic will make the values which was removed from metadata
cannot be in payload, this caused the third party receiver cannot know
which metadata was removed.

The fix was always using the values from variable "updates" as the
metadata for payload as it include values removed and new added.

Change-Id: I7b78795e325f52cfb9c24eabd9ef42990666c02d
Closes-Bug: #1269684
Merge "Enforce query order for getting VIFs by instance"
Merge "Payload meta_data is empty when remove metadata"