ENH: avoid meshgrid and fancy indexing for 1d masked sort, for 1.9

Improves performance by using the simple indexing path and memory by
avoiding creating a full meshgrid.