WL#8539: Ordering of scalar JSON values

Status: Complete

When ordering scalar JSON values with ORDER BY, they should be returned in the
order defined by the JSON comparator in WL#8249.

This worklog will implement a function that produces the sort keys filesort
needs in order to sort JSON values.