Optimize firstObject/lastObject/objectAtIndex at bit

I was going to complain about how suboptimal #1005 was due to using the public API but then decided to try to make the public API not so suboptimal instead. Makes `firstObject` and `lastObject` as much as twice as fast by ensuring that the `TableView` is created before we check the count, fast enumeration ~10% faster by using __unsafe_unretained in useful places, and `objectAtIndex:` ~30% faster by caching the objectSchema rather than looking it up on every access.

@alazier 
The point is to call it before `self.count`, so that `self.count` can just return the size from the TableView rather than running the query to get the count then running it again to build the TableView.