Initial implementation of a "cache accumulator" behavior.
Mix Puppet::Util::CacheAccumulator into an ActiveRecord-like class, and then for any
attribute in that class on which you are likely to call find_or_create_by_*, specify:
accumulates :foo
and instead of :find_or_create_by_foo use :accumulate_by_foo.
The class will cache known results keyed by values of :foo.
Do an initial bulk-lookup: class.accumulate_by_foo('foo1', 'foo2', 'foo3', 'foo4')