CA-248538: Fix deadlock while restarting system services
CA-248538: Fix deadlock while restarting system services

There is a chance that when 'HelperFunctions.Helpers.ServiceRestart()'
is called, the service to restart is not in the 'Running' state. This
resulted in the service not being asked to stop, and the InstallAgent
to wait indefinitely until it's stopped.

- Call 'Stop()' if service is in any state except 'Stopped' or
  'StopPending'
- Removed 'WaitForStatus()' call; instead check the service's status
  every second and log it

Signed-off-by: Kostas Ladopoulos <7920ee5edb7fd3a4c6c6e3ebe9bd13d4a7f2eff1@citrix.com>

xenserver/win-installer,OwenSmith/win-installer,xenserver/win-installer,xenserver/win-installer,OwenSmith/win-installer,xenserver/win-installer,OwenSmith/win-installer,xenserver/win-installer,OwenSmith/win-installer,OwenSmith/win-installer