fix closing irods connections

Now the close_storage() function is called on every response return,
so a new connection will be required at the next call.

If no storage connection exists, the function does nothing.

I expect, but don't know for sure that the reason that it works now
is related to using stream_with_context in the output streaming.

The connection that is closed is the one in the request context and
is assumed to be the correct one.

Because it's called on teardown_request, connections will be closed
even if the request throws an exception (which didn't work before).