Make 2i pagination sort optional

This addresses the performance penalty from the new default of sorting
2i results since pagination was added. When paginating, (max_results
set) sorting is always enabled. But when not, it will only be used if
configured in app.config or specified in the client request.