The overall goal here is to make readline more interoperable with other node Streams like say a net.Socket instance, in "terminal" mode. See #2922 for all the details. Closes #2922.