[#4590] SimpleGraph is slow
Rewrote SimpleGraph to use a more efficient internal representation.
To preserve compatibility with older clients, graphs are still
serialized to YAML using the format used by Puppet 2.6. However, a
newer, more compact format can be enabled by setting
"use_new_yaml_format" to true. Deserialization from YAML accepts
either the old 2.6 format or the newer format. In a later release,
once we no longer need to be compatible with 2.6, we will be able to
switch to the new format.
To make deserialization accept multiple formats, it was necessary to
use the yaml_initialize method. This method is not supported in
versions of Ruby prior to 1.8.3, so a monkey patch is included to add
support for it to Ruby 1.8.1 and 1.8.2.
Thanks to Markus Roberts for the SimpleGraph rewrite. Thanks to Jesse
Wolfe for figuring out how to write the yaml_initialize monkey patch.