fix ensure_packages duplicate checking
fix ensure_packages duplicate checking

Instead of just looking for an already existing package resource with
the same name, we should check for the parameters, too. Otherwise having
one ensure_packages call with ensure => present and one with ensure =>
absent leads to the second function call being ignored. It should throw
a duplicate declaration error instead.

Since we are already calling ensure_resource internally and
ensure_resource itself does check for duplicates, we don't need that
extra check in ensure_package.

DavidS/puppetlabs-stdlib,puppetlabs/puppetlabs-stdlib