Fixes for handling range requests while also multi-threading.


git-svn-id: svn://svn.code.sf.net/p/staden/code/io_lib@3745 ba6f2710-ca9f-427c-89d3-5bf716dbc8e1