Make threading for index sort configurable.