[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.
Well, after a bit more testing, I'm still hitting the refresh crash even with your suggested changes. I guess it's good that we can now reproduce the issue. Feel free to dig in deeper if you think you can uncover the root of the issue.