Add basic remote console support
Summary:
This is a more practical example built on top of D2836. The lint_mock.php is a functional example that simulates a process very similar to what we're after.
When lint_mock.php starts, it launches a background process that simulates lint, then sleeps for 5 seconds to simulate editing a file. The background process randomly prompts the user for input.
After the 5 second "file editing" phase, the foreground process starts a console server for the background process and essentially lets it take over control of stdout/stdin/stderr. Any work the background process has done is printed, and the background process can now interact with the user. If it needed to prompt them, it will be waiting for input; if it didn't, it will have made substantial progress while the user was "editing a file".
Test Plan: Ran lint_mock.php, got sensible behavior.
Reviewers: vrana
Reviewed By: vrana
CC: aran
Differential Revision: https://secure.phabricator.com/D2841