(#2437) Nagios::Base#to_s should be deterministic

not deterministic before 1.9.0.
We now sort the keys before looping.