The main motivation for this is that building error messages via string
concatenation is tedious and makes it hard to judge what the actual message
looks like when there are a lot of parts being inserted, to the extent that
I've been tempted to leave out some potentially useful information because the
code was getting unwieldy.
It also has some small functional benefits: bools are printed as true/false
rather than 1/0, and it is optimized for minimizing the compiled size.
Currently it cuts ~30 KB off librealm-object-store.dylib even with the addition
of new functionality.
`Realm`, and moving from a `Results` to not result in a use-after-free.
The compiler generated move-assignment operator resulted in `m_notifier`
being assigned to without first calling `CollectionNotifier::unregister`.
This left a retain cycle in place, causing the `Realm` and other objects
to leak.
`ResultsNotifier` keeps track of which `Results` it should update when a
new `TableView` becomes available. When `Results` move-assignment
operator and move-constructor transfer ownership of the
`ResultsNotifier` to a new instance they also need to update its target
so it won't attempt to update the moved-from `Results`.
Deliver the initial results for both of them and include the changeset
in the initial delivery for both, rather than having them behave weirdly
differently.