(FM-7388) Fix getvar_spec for Puppet 6.0.0
(FM-7388) Fix getvar_spec for Puppet 6.0.0

In Puppet 6.0.0 the getvar function is in Puppet and it has
new functionality as it supports an optional second argument
with a default value.

The new implementation also does not accept faulty variable
names - for example starting with '$'. Here the old implementation
simply returned undef because there is no way the language could find
a variable starting with '$' (the internal APIs are always without '$').

The tests are updated so that on Puppet 6.0.0 and later, it tests a
default value, and test for bad variable specification is changed to
simply test for a not found variable. (The real tests for the function
in puppet already tests that it raises an error for faulty variable).

puppetlabs/puppetlabs-stdlib,DavidS/puppetlabs-stdlib