Sort the translations before exporting to a file as json

This pr fixes a bug whereby, if you're using assets pipeline with digest = true, the digest of the resulting ``application.js`` are different on different servers.

 I found out it was because the order of the generated translations hash keys could be different. That would programmatically not be a problem but it's a problem when generating an md5 of the content.

 So sorting the hash before saving to a file would make sure it's always the same content all the time, resulting in a consistent hashing on different servers.

Thanks