Now unregisters ReadOnlyDatabase as part of close.