IOInputStream#close closes underlying streams once.

Closeable#close can be called any number of times. IOInputStream is
delegating to RubyObjects that throw an error when they're closed
multiple times. Adds a short-circuit flag so they're only called once.