less profanity
[RFC] move reup output to PERU_REUP_OUTPUT

Summary:
Previously we've allowed plugin fetches to print directly to stdout, but
used the stdout of reup to get the actual reup data. This is kind of
inconsistent, and with the upcoming fancy console display, we're going
to want reup to print progress to stdout the same way fetch does. We'll
need a different channel for reup's actual data output.

Create the `PERU_REUP_OUTPUT` variable, which is defined during reup to
point to a temporary file where the plugin should write its
YAML-formatted result. Conceptually this is similar to the
`PERU_FETCH_DEST` variable already used for output during a fetch.

For now, discard the stdout from reup but allow the stderr to print to
the terminal. In the future, we'll do the same thing with stdout here
that we do in a fetch.

Reviewers: sean

Differential Revision: https://phabricator.buildinspace.com/D89
[RFC] fancy job display

Summary:
Create a multi-line terminal display that shows output from plugin jobs
in real time. This requires reworking the way plugin jobs deal with
subprocess output. They now take an "output handle", which is a
buffer/context-manager that implements `__enter__`, `__exit__`, and
`write`. Jobs receive these handles from a "display" object that lives
on the `Runtime`, and they write to the handles inside a `with` block,
which lets the display know exactly when jobs start and stop.  The
plugin tests also include a dummy handle implementation, which is a thin
wrapper around a `StringIO` buffer.

In addition to the default `FancyJobDisplay`, there is a
`QuietJobDisplay` and a `VerboseJobDisplay`. The quiet one prints
nothing, and the verbose one waits until each job is finished to print
all its output to the terminal in one go (so it's not real time, but
it's formatted in a way that's suitable for log files). Errors from
plugin jobs are handled by throwing `PluginRuntimeError`, a subclass of
`PrintableError`, so the displays don't need to do anything special.

The fancy display would like to draw to the terminal as soon as it gets
output from a job, but with a few git clones running in parallel that
starts to cause unacceptable flicker. My solution right now is to draw
on a 0.1 second delay, so that a ton of updates coming in at once get
coalesced into a single draw. The main downside of this approach is that
it makes `FancyJobDisplay` depend on the asyncio event loop to implement
that delay. I'll probably have to hack around that to write tests.

TODO: Add more comments in `job_display.py`. Write unit tests for the
different display types. Make hg, svn, and curl print progress to the
terminal (right now only the git plugin has been brought up to speed).

Test Plan:
The plugin tests use `TestOutputHandle` to work with the new interface.
Still need to write serious unit tests for the displays, which will
probably involve creating a little terminal simulator that knows how to
interpret the ANSI control codes we're using.

Reviewers: sean

Differential Revision: https://phabricator.buildinspace.com/D91