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.
Merge pull request #1426 from elyezer/force-wm-kill

Force kill window manager if it hangs
Port old API tests for repositories

Completely rewrite existing tests in module `test_repository_v2`. Make them more
terse, efficent and thorough. Drop module `test_repository`, as the "v2" module
now performs its responsibilities.