Replace some calls to Closeables2.closeQuietly

Prefer try-with-resources.
Replace calls to ByteStreams2.toByteArrayAndClose

Prefer try-with-resources.