Force kill window manager if it hangs

Sometimes the window manager hangs and blocks the UI automation. Now the
window manager process will be force killed if it does not terminates in
30 seconds.

Also improve logging to show the window manager command as a string.