Generalised textstream_t to stream_t. Rearranged documentation.

lineno is now a field of filestream_t.