(PUP-3589) Only treat 'ensure' specially if it is a property

Without this patch, any 'ensure' parameter in a type is treated as if
it were a property that needs to be synced. Since "syncing" only makes
sense for a property (which is a special type of parameter), and not a
parameter in general, this causes Ruby to throw undefined method
exceptions if 'ensure' is not a property.

This patch only treats 'ensure' as syncable if it is a property,
allowing native types to use that name for a bare parameter. This is
particularly useful for custom types that exist only to generate
additional resources on the agent, without having any properties of
their own, but which pass on their parameter values to properties of
the generated resources.
We have a custom type with an ensure value that is a parameter that worked prior to our upgrade from 2.7.26 to 3.6.2. 6ff0a10366e6ffed14ad310f16bbe9369c659e6a is the commit that changed this (as of Puppet 3.4.0); the old behaviour was to read all property 'should' values into a 'desired_values' hash and only operate on ensure as a property if it exists in that hash.

I'm not sure under what conditions the other hunk (in lib/puppet/type.rb) is a problem; that has been around much longer (since 2.6.0), but it didn't cause problems for us. I added it because it causes failures with the added tests for this change.