Restore streamInput() performance over PagedBytesReference.

Closes #5589