Using MetaDataUpdate in a try-with-resources block closes the repo as
soon as the BatchMetaDataUpdate is opened, which is not what we want.
In the traditional RepositoryCache case this doesn't hurt, since we
maintain a nonzero refcount for open repos so the close is a no-op,
but this is not always the case.
Instead, don't close the MetaDataUpdate implicitly, but rather
explicitly close it from the close method of the enclosing
BatchMetaDataUpdate.
Change-Id: I40871efd38d11375367a2909cf8eff4443e68f20