Implement sorting arrays by multiple columns at once

Not really a fan of the API but I don't have any better ideas.

@jpsim @alazier