massive refactoring of the library

among other changes, this removes the old fstrm_io and fstrm_writer
interfaces, and adds new fstrm_iothr, fstrm_rdwr, fstrm_reader, and
fstrm_writer interfaces.