added new option to sort keys in objects

We use renderjson in https://www.github.com/analogbyte/saltobserver and needed an option to sort the objects by their keys.