[WIP] Perform queries on demand

This creates TableViews on demand rather than executing queries on RLMArray creation. This also fixes the bug when re-sorting RLMArrays and other issues caused by not holding onto the query used when creating a TableView.
It does make sense for that to eliminate crashes in some places, as it's eliminating a non-owning reference to a TableView that could get destroyed before the query.