The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
The filepos type is not necessarily an integer type, because it also needs
to save the multibyte character state in case we're reading from a stream
with shift states.
The convention of using -1 as a special value is from Unix ftell(), and not
portable. Instead, the stream's failbit needs to be examined after the call
to tellg().