Windows instances require the timezone to be "localtime"

This was relatively simple to fix, assuming that the image used
to boot the windows instance has the os_type set to "windows".
The use of os_type in this manner is consistent with the
existing use in the Xen hypervisor driver.

DocImpact: if you're booting windows instances, then you need to
set the os_type image property in glance to "windows". Otherwise
your instances will have their clock timezone set to UTC, which
has unexpected side effects in windows.

Change-Id: Id6759a290ed25c9add97ac61bb7d165b3fb908b2
Closes-Bug: 1231254
xenapi: enforce filters after live-migration

Currently and network filters, including security groups, are
lost after a server has been live-migrated.

This partially fixes the issue by ensuring that security groups are
re-applied to the VM once it reached the destination, and been started.

This leaves a small amount of time during the live-migrate where the VM
is not protected. There is a further bug raised to close the rest of
this whole, but this helps keep the VM protected for the majority of the
time.

Fixes bug 1202266

Change-Id: I84fdb6e2a8ee38d75f243aadbe79945af1d6849d
Fix unicode string values missing in previous patch

Commit 61bedc9aa04b0bac21e5c4bd17d6d2c09e2d9e01 lost some code
around the str_or_none() helper in objects/utils.py during a
rebase which caused almost all of our values to not actually
be coerced to unicode. This adds that.

Also, the instance.uuid value can't (and shouldn't) be unicode,
so add a cstring() helper and convert it to use that so that
the above change doesn't try to make uuid be unicode. Also,
make str_value() enforce non-None-ness like cstring() to avoid
bugs where we get 'None' unexpectedly, and add a test for that
whole function, which was missing before.

Change-Id: I941545d38aee10f140610b268fbd9c744f6545f9
VMware: Fix SwitchNotFound error when network exists

In FlatNetworking mode, when a virtual network exists on the vCenter
host we still check for the presence of a physical adapter specified
in vlan_interface. This check is only needed if we are going to
create a new network on the vswitch associated with the interface.

This fix removes the check for the physical adapter and the vswitch
when network already exists.

Fixes: bug #1226238
Change-Id: I1eecf2c339534d8694ec6a8bdfaff5217ba2f8ef
Make sure periodic task sync_power_states continues on error

If an instance sync_power action fails with an exception, no more
instances will be synced. If the failure is permanent, this will block
other instances from having their power states synced for as long as
this keeps happening.

Make sure to catch and log such exceptions and then continue with the
next instance.

Change-Id: Ie3cf5d7f590cb680e712d76b7a32c630e82f362d
Closes-Bug: #1228160
Merge "xenapi: enforce filters after live-migration"
Merge "Fix unicode string values missing in previous patch"
Merge "VMware: Fix SwitchNotFound error when network exists"
Merge "Make sure periodic task sync_power_states continues on error"
Merge "Windows instances require the timezone to be "localtime""