Allow 0 and 1 to be used as bools in predicates
Merge pull request #772 from realm/tg-bool-0-1

Allow 0 and 1 to be used as bools in predicates
fix for incorrect macro
Merge pull request #779 from realm/al-macro-fix

Fix for incorrect macro
Explicitly autorelease realms returned from RLMRealm class methods

Currently whether they are or aren't depends on the whims of ARC, which
means that it's inconsistent as to whether or not the following code
works:

    [[RLMRealm defaultRealm] beginWriteTransaction];
    // ...
    [[RLMRealm defaultRealm] commitWriteTransaction];

Currently this works only in debug modes or if there is anything else
keeping the realm alive, which is rather confusing.
Ensure the write transaction from initializing a realm gets closed

RLMRealmSetSchema throws if a migration is needed but was not provided,
which resulted in the write transaction not being committed until the
realm object was destroyed.