More robust process handling

Use timeouts for all indefinite waits in process.cpp. On timeout, check
the state of the relevant QLocalSocket to see if it looks like the other
party is still up. On windows checking .isValid() appears to work, on
linux, checking that state != unconnected appears to work.