(PUP-3365) Change 3x deep map of undef to only do surface map

This changes the mapping of arguments to 3x function calls to not
map undef to empty strings except at the surface level. Other mappings
are still done as they are required for frozen strings, and values
having a type that is not supported by the 3x functions.
(PUP-3363) Make transformation of unparenthesized calls handle errors

This fixes problems when a user enters commas where they are not
supposed to be. As a result, an expression will be parsed as being an
argument list for an unparenthesized function call. The transformation
logic for such calls did not take one case into account; a non call
followed by an argument list. e.g:

$a = 1,10

Which resulted in a strange AST model (a literal list with an assignment
and a 10).

This commit adds error checking and raising of an exception in the
transformation which is caught by parser_support and formatted into an
error - either about an illegal comma (when the LHS cannot possibly be
a call at all (as in the above exampel), or a more elaborate
message about that what could be a function call requires parentheses.

In order to enable positioning of the error message on the first comma
in the argumet list, the comma tokens were required in the expression
list fed to the transformer. Subsequently these tokens must be filtered
out by the transformation, and passed on in the raised exception (since
the receiver would otherwise not know which token that caused the
problem (it is nested inside the stucture it passes on to be
transformed).

Unparenthesized function calls are a very bad idea...
Merge pull request #3154 from hlindberg/PUP-3363_trailing-comma-assign

(PUP-3363) Make transformation of unparenthesized calls handle errors
Merge pull request #3142 from hlindberg/PUP-3365_remove-deep-undef-mapping-in-3x-func-api

(PUP-3365) Change 3x deep map of undef to only do surface map
(PUP-3364) Improve the error message for numeric resource titles

This improves the error message when a numeric resource title is
used in a resource reference, or when a numeric attribute name is
referenced. The message used to be too generic, and used internal
Ruby types instead of puppet types in the message string.
Merge branch 'pr/3136' into stable

* pr/3136:
  (PUP-3364) Improve the error message for numeric resource titles
(PUP-1165) Perform validation on desired triggers not current

The `enabled` and `index` trigger parameters are read-only, so they will be set
in the `current` trigger, but are not allowed in the `desired` trigger.
Previously, the `translate_hash_to_trigger` method performed validation based
on whether it was passed a `current` or `desired` trigger.

This commit moves the validation logic to the `validate_trigger` method, which
is only ever called with `desired` trigger values. It also allows the `index`
and `enabled` keys to be present in a trigger. This isn't an issue because they
are ignored for the purposes of determining if two triggers are the same.

The reason for this change, is because ultimately we don't want the
`translate_hash_to_trigger` method to mutate the `current` trigger, and this
commit makes it so that the `index` and `enabled` keys can be in the
`puppet_trigger` but will be ignored.
(PUP-1165) Ignore scheduled_task trigger start_date when unspecified

Previously, if a scheduled_task resource was created in the past, and
the desired value of the resource's trigger did not specify a
`start_date`, then puppet would think the resource was out of sync,
and attempt to delete the old trigger, and add the new one. This
process would repeat once per day, leading to spurious 'triggered
changed' messages, and reports.

This commit modifies the scheduled_task provider so that if the
desired value does not specify a `start_date`, then it will
effectively be ignored when comparing the current and desired
triggers.
(maint) Remove magic behavior

Previously, the `#triggers` method on the scheduled task provider would
magically return single element or an array of multiple elements.

This commit changes the provider to always return an array, of possibly a
single element.
Merge pull request #3158 from joshcooper/ticket/stable/PUP-1165-task-scheduler

(PUP-1165) Provide a default value for windows scheduled task trigger
Merge branch 'stable'

* stable:
  (maint) Remove magic behavior
  (PUP-1165) Ignore scheduled_task trigger start_date when unspecified
  (PUP-1165) Perform validation on desired triggers not current
  (PUP-3364) Improve the error message for numeric resource titles
  (PUP-3363) Make transformation of unparenthesized calls handle errors
  (PUP-3365) Change 3x deep map of undef to only do surface map