Remove a collection key when it gets empty in Repository::Memory