Sort ruby hashes before interpolation in ferm defs

Ruby hashes are not stable and will yield a different order of iteration
for every execution. As a result ferm defs would change in every puppet
run causing excessive filebucketing. Fix this by sorting the hash into
a nested array and then map it to achieve consistency

Change-Id: Ia358291deddb706eb7ff3fb6e1424e6b77ac6460