Using instance of RLMRealm in write transactions

In release mode, write transactions must be performed using an instance of RLMRealm.

The unit tests performed within Xcode are executed in debug mode while `sh build.sh test` will execute in release mode. Apparently, `[RLMRealm.defaultRealm beginWriteTransaction]` will - in release mode - do a commit while the write transaction will remain open in debug mode. I guess that the Objective C runtime will deallocate objects earlier in release mode, and an auto commit is performed too early.

@alazier @tgoyne