Workaround for Windows 8 "Can't spawn cmd.exe" error.

Windows 8 CI builds fail randomly with "Can't spawn cmd.exe" error,
after some investigation it was found that OS environment gets corrupted
on those cases. For more information, please see comments in code.

Since the root cause for environment corruption is not yet known,
workaround implemented by using environment backup/restore mechanism.

With this workaround I managed to run QtQA_master_integration CI in
a loop for 100 times, and without workaround the error typically
happened between 10-20 executions.

Change-Id: I034a3f45a2bd2b791d5beabcd57d8047d1936e68
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>