client: sort the keys in the template

Ruby hashes are not ordered and the keys may be rendered in a different
order each time. This change orders the keys given their name to have a
consistent key order across puppet runs.