RealmQuery.findFirst - unit test and faster implementation

The method `findFirst()` does have a unit test so I added one. And while looking at the method, I reimplemented it for better performance.

@bmunkholm @emanuelez