Convert sort objects to mongo sort arrays

`{ field1: 'asc', field2: 'desc' }` get converted to
`[['field1', 'asc'], ['field2', 'desc']]`