sort table with closure (ie, support numeric sort, multi-field sort)