Don't materialize the TableView for a query just to get the count

Speeds up counting 100k items with a simple string equality query on a 4S from
108ms to 26ms, and presumably reduces memory usage somewhat.

Doing the same thing for aggregation functions doesn't appear to help at the
moment.
Test both query and tableview count updating
Merge pull request #850 from realm/tg-count-query

Don't materialize the TableView for a query just to get the count