Fix a potential bug in InputOutputStreamFD

If the backing Java InputStream reads zero bytes, InputOutputStreamFD
will incorrectly report EOF.  Force a second read that conclusively
determines EOF.  The documentation for InputStream says this shouldn't
be an issue because read(byte[]) will always try to read at least one
byte, but it's an easy detail to miss.
Add the ability to swap out stdio of a UnixRuntime
Improve the behavior of a few file-related system calls
Small amount of documentation