BUG: fix multi-column sort that includes Categoricals (GH7848)

CLN: refactor _lexsort_indexer to use Categoricals

closes #7848 
I don't mind, but I had to read the code to understand what n is and what the array is and so in this case the return value despite being documented it was actually "undocumented".