Sorting query parameters by key before processing

 - Query parameter order in specs to use sorted values again
 - Adding test for maintained array value order
 - Updating test to include mix of array and non-array values for sort.