Fixes a problem with unclosed streams

The streams don't get closed during processing and so stay open and thus cause the test ReplicationTest/testPushReplicationCanMissDocs to fail on Windows but more general mean that anytime, anyone ever uses multi-part (which is used, for example, by the pusher) then the streams will be locked forever and attachment cleanup isn't possible.
Should this be inside the `else` block below (i.e. after `inputStream` is known to be non-null)? Currently, `null` can be added to `inputStreamBodies`, which would NPE in the `finally` block at `is.close();`, wouldn't it?