Add sort_array function

This PR adds Hive's ``sort_array`` function that sorts the given array in ascending order according to the natural ordering of its elements (only if the array elements are Comparable).
I don't think this works. To compare two stack representations of a Type, you need to use `Type.compareTo()`. Unfortunately, that method only works for Blocks, although it should really be generalized. 

To implement this before that change is made, you'll need to build Blocks, then compare them using the Type object. Alternately, you could add an assertion that it's one of the types whose stack representation can be sorted by comparing their bits (MapParametricType has a incomplete list of these)