(22740) create_resources input validation

Currently, Puppet's `create_resources()` function only valdiates the number of arguments. However, the function expects a hash for the second argument, and Puppet explodes with an unhelpful error if the second argument is not a hash, or nil.

For example, if the second argument is a string, you'll receive
something along the lines of:

    undefined method `each' for "":String at /etc/puppetlabs/puppet/manifests/site.pp:45`.

This is less than helpful for users.

This patch raises an argument error if the second argument is not a
hash, warning the user that it should be one.

It also raises an argument error if the third argument is provided, the second is a hash, and the third is not.