Major buffer improvement - implement buf_fgets natively rather than having
to repeatedly call buf_fgetc.  Still copies characters one by one, but
copes well with having to load a new block of buffer part way through the
string.
Generic buffer now does not need a bz_getc, implements a buffered fgets natively.
We use that now.  It be faster.
Implemented xz_open function.  Still lots of work to do.
Removing irrelevant copied doco note in fflush.
Implemented (simple) eof, removed no longer necessary getc, use generic buffer implementation of gets, reuse xz_write in vprintf remove irrelevant copy-and-pasted comment in fflush, remove copy-and-pasted code in close.