unify newlines in subprocess output
unify newlines in subprocess output

Summary:
Because all asyncio subprocess output is read in binary mode, we don't
get universal newlines for free. But it's the right thing to do, because
we do all our printing with strings in text mode, which translates "\n"
back into the platform-appropriate line separator. So for example,
"\r\n" in a string on Windows will become "\r\r\n" when it gets printed.
This function ensures that all newlines are represented as "\n"
internally, which solves that problem and also helps our tests work on
Windows. Right now we only handle Windows, but we can expand this if
there's ever another newline style we have to support.

Reviewers: sean

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

ierceg/peru,nivertech/peru,olson-sean-k/peru,scalp42/peru,buildinspace/peru,enzochiau/peru,enzochiau/peru,olson-sean-k/peru,ierceg/peru,oconnor663/peru,nivertech/peru,buildinspace/peru,oconnor663/peru,scalp42/peru