test: sort_pairs: stringify vals, seperate fields

Otherwise something like these would sort differently, despite being the same:

[[{ a: '12', b: '3'}, {}]
 [{ a: '1', b: '23'}, {}]]

[[{ a: '1', b: '23'}, {}]
 [{ a: '12', b: '3'}, {}]]