Implement -[RLMArray indexOfObjectWhere] and friends

And fix a crash when filtering a tableview which the test for this ran in to.

@alazier