(#9837) Move resource formatting method to Puppet::Resource
Rather than use a proc in the Resource application, we move the proc to
be a method on Puppet::Resource so that we can reuse the method in the
MCollective puppetral agent.
Reviewed-by: Max Martin <max@puppetlabs.com>