Parts of IO#getc, IO#readline, IO.new, IO.for_fd, and IO.sysopen

As the commits may reveal, this started out as work on `IO#getc`.  It turns out `rubyspec` has a fairly tangled set of dependencies in the `core/io/` tree, and the rabbit hole resulted in implementing *some* of `IO#getc`, `IO#readline`, `IO.new`, `IO.for_fd`, and `IO.sysopen`.  In the process, I extracted some file mode parsing into a utility func, although I did some gross stuff to make translation work since the annotator (?) was exploding when trying to union the error type (from the `raise invalid_error`) and fixnum return value.

I'm very much prepared to break this thing up if deemed possible.  :sleepy: