Fix file descriptor handling.

Eliminate $file in favor of storing the file descriptor in the Java fd object.

Refs #176.
Misc tweaks to core viewer.
Implement file pointer position tracking for all FileChannels.

In particular, we added the $pos field to FileOutputStream, and standardized all
uses of $pos to be Numbers instead of gLongs.

JRuby 1.7.3's REPL uses this.