windows: Wait for the VM to shutdown if booted

If we have verified that the OS in the Windows VM has booted, then wait
for a while to let it properly shut down even if an error occurred.
windows: Fix a bug in Registry class

Make sure the guestfs handler is never cached in registry class. There
are cases where the guestfs handler is recreated in image class. The
registry code should always access the guestfs handler from the image
class and never from a local copy.
windows: Disable hibernation when booting

This used to be a sysprep but it is better if we disable it right away.
This is not needed for VMs and if this is enabled, the system will
hibernate on an ACPI shutdown event which will make the system
preparation to fail.
windows: Uninstall the WinEXE service just once

Do not install and uninstall the winexe service in every single
execution of vm.rexec(). Only uninstall the service after executing the
last command which is either the sysprep or the shutdown command.
Add a ismounted property in OSBase class

This can be used to check if the media mounting was successful