Add SortByKey to all device adapters.

This allows use to sort an array of values, using a secondary
key array.