[BUG] Sorting a sorted RLMArray

Core's `Query::tableview` method should not be used as it does not support sorting a sorted view. 

See also https://github.com/willmoore/RealmTest for original bug report.

@alazier @tgoyne @jpsim 
They are testing that you can resort a sorted `RLMArray`. Counting is just an indicator of the bug.