librusti: only use std::rl if stdin is connected to a tty.
auto merge of #5864 : huonw/rust/rusti-detect-tty, r=graydon

This is a fairly large hack, just passing an extra argument through, and I can't test it at all, since rusti doesn't work here to begin with.