clean up inputstreams in finally blocks
patch by Mikhail Mazursky; reviewed by jbellis for CASSANDRA-5580