Move parameter formatting rules into helper method
By moving the logic for formatting the values of parameters and
properties into a class method on Puppet::Parameter, we can re-use
this logic in more places, without having to duplicate it. This will
also allow us to more easily add support for properly displaying hash
values, which will be necessary as part of Redmine issue #8414.