Rewriter: Output RewriteRope contents efficiently

This avoids allocation of temporary std::strings for file contents, instead
writing chunks directly to the output stream.

The old character-based B-tree iterator remains intact for the time being.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196119 91177308-0d34-0410-b5e6-96231b3b80d8