Modify `arc` to be able to print stuff after the arc output.
Modify `arc` to be able to print stuff after the arc output.

Summary:
There are a few times we'd like to give advice to users of arc that
epriestley doesn't want to accept upstream.  We could put this advice
in arc itself, and fork it, but instead I've decided to put it in the
arc wrapper we use.

Unfortunately, we need to be able to process the output of arc in
order to be able to decide what to print.  But we don't want to lose
the interactivity of the arc output.  So I do something like webapp's
tee_communicate(), to emit the output of arc to the screen and to a
python buffer at the same time.  But it's more complicated than
tee_communicate() because I need to fool arc into thinking output is
going to a tty, so it does colorizing and such.

Eventually I got it to work.  I've added some help for what to do when
a diff is too large.  Next up will be to add some help for what to do
when `arc lint` fails, but the error output is truncated.

Test Plan:
I ran the following without error:
   arc help diff   # was colorized
   arc help diff | cat
   arc help diff 2>&1 | cat
I also checked out b6cfc39 in Khan/react-render-server and ran
   arc diff --verbatim --nolint --nounit --excuse testing
and it failed like so (with color!):
```
Exception
[HTTP/413]
<html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>
(Run with `--trace` for a full exception trace.)
(Run `arc diff --less-context` to work around.)
```
So it successfully added my new text!

Reviewers: benkraft

Reviewed By: benkraft

Subscribers: jeff

Differential Revision: https://phabricator.khanacademy.org/D51470

Khan/arcanist,Khan/arcanist,Khan/arcanist,Khan/arcanist