Improve performance when polling R's stdout/stderr

Trade off a lot of CPU time for better R interpreter performance
when the interpreter is outputting lots of text.