[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 
Ah yes, in that case, I'm not sure what the advantage of having this as a function rather than method is.

But in any case, I closed this issue in favor of #838 since this PR seems to be strictly a subset of the other one. Let me know if I'm missing something.