rust: Don't use fileEOF() as it behaves unexpectedly

fileEOF() actually returns TRUE anywhere after the last newline when
using the file*() API, which includes a last line without newline.
This is an implementation detail which makes this function not usable
with the rest of the file*() API.  fileEOF() should actually probably
be called iFileEOF(), but that's outside the scope of this parser.

However, even if fileEOF() did work properly with fileGetc(), the very
last byte in the input would have been omitted because we actually
read ahead by one byte, which means the actual read reaches EOF one
byte before our "current byte" does.

Checking whether we reached EOF by checking whether our current byte
isn't equal to `EOF` fixes it, and isn't worse since it's actually how
fileEOF() is implemented anyway.