Stabilize the output of stdlib's keys function

The stdlib's keys functions returns the keys of a Puppet Hash. However a
puppet hash is implicitly a ruby hash which pre 1.9 ruby has not
guaranteed order of item when populated. As a result the result of
keys() may differ on every run. Solve this by calling sort on the output
of the ruby keys() function. This is a workaround that will probably not
be needed on ruby 1.9 and could be revert/discarded on a future stdlib
update

Change-Id: I53b0a3b48655b0876267de88223e4dca8155cad5
Merge "Stabilize the output of stdlib's keys function" into production