Eliminate some redundant query executions

Ensure the TableView is constructed in `firstObject` and `lastObject` before
checking the count as we'll need it to actually get the object.

(cherry picked from commit 225c44191861391d08fa1e7b4b8ece50a9c9c329)
Cache objectSchema on RLMResults/RLMArrayLinkView

Speeds up fast enumeration ~5% and slow enumeration (via objectAtIndex: ~25%).
Add some __unsafe_unretained in useful places

Speeds up fast enumeration and objectAtIndex: by ~10%.
Make RLMObject not retain its objectSchema

The object schema is always retained by the realm, and not retaining it in the
object speeds up fast enumeration by 12%.