only call indexOfObject: once when removing an object

Hi @nkirby, just a small optimization. Realm *is* a database after all :wink: