I'd like to compact a Realm instance on iOS periodically to recover space. I think the process is to copy the db to a temporary location, then copy it back and use the new default.realm file.

My problem is `Realm()` acts like a singleton and recycles objects so I can't really close it and tell it to open the new default.realm file.

The docs here (<https://realm.io/docs/objc/latest/api/Classes/RLMRealm.html>) suggest I wrap all the Realm() calls in `autorelease { }` but it can't be this complicated.