Make `ObjectRepository` and `NitriteCollection` closeable so that can be used with try-with-resource block