[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.
Good catch - We were doing this at one point, but it was causing crashes in core. With @rrrlasse 's latest changes this seems to now work.

Making this change also seems to fix the refresh issue - on this branch as is, we trigger the error when running the osx tests on XCode6, and with your suggested change this issue goes away. The question is if this line of code is the cause for the refresh issue, or if making this changes simply covers it up?