Reland "[blinkpy] Manage the lifecycle of wptserve better"

Changes in blinkpy/web_tests/servers/apache_http.py are reverted from
the original change, because on Windows the Apache process runs in
foreground; everything else is unchanged.

Original change's description:
> During a recent roll of wpt tools, wptserve was broken and it was very
> hard to debug. A few changes are made to improve the debuggability and
> overall code health of wptserve management in blinkpy.
>
> * Stop discarding the output of wptserve. Set the logging level to info
>   (the default is debug) and preserve the output, so that it can be
>   dumped out when something goes wrong.
> * When checking and killing wptserve, we now poll the process before
>   sending the null signal, as `kill -0` a defunct process will still
>   succeed. We can now reap zombies much faster :)
> * Lastly, _check_and_kill no longer does blocking wait inside. Now,
>   _wait_for_action(_check_and_kill) makes more sense and matches the
>   pattern in ServerBase better; and we send SIGKILL as a last resort
>   (on POSIX).

> apache_http.py is modified by the way to replace an unnecessary popen
> with run_command. httpd exits immediately after it spawns the daemon,
> so there's no use holding onto the defunct main process.
>
> Change-Id: I441d36739451ad1e37afc6afe8f3c089cf224822
> Reviewed-on: https://chromium-review.googlesource.com/1026889
> Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
> Commit-Queue: Robert Ma <robertma@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#553619}

Change-Id: Ic5476726a1f65d75e6e3bc23a9824d1d6ac70c0e
Reviewed-on: https://chromium-review.googlesource.com/c/1401449
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621164}
4 files changed