CMS-4395 : Make sure all ByteStreams.toByteArray are closed - Last commit had wrong message.  This message is for both commits:  Cleaned up all stream handling for ByteStreams, and made sure all open streams are closed.  This second comiit is just cleaing up code.