wmflib: add ordered_yaml()

Ruby 1.9+ hashes maintain insertion order. The serialized form of hash is
therefore stable across Puppet runs, *but* only insofar as the insertion
order is stable.

This patch does two things: first, it makes ordered_json.rb substantially
simpler, by keys from a hash into a new hash in lexicographical order and then
serializing the result. Second, it adds an ordered_yaml function that does the
same thing, except it emits YAML rather than JSON.

Change-Id: I62605c2a23b3607dd8616c25d823ee341fb327c7