(PUP-1057) Remove the function stubs for collect and select

These functions are just stubs that raises an error, and they are
no longer needed.
(PUP-2755) Move iterative functions to the new API

This moves all the iterative functions to the 4x function API.
Functions are now simpler to read. A shared utility module
was created for repeated asserts.

While testing it was clear that it is difficult to use
Puppet.lookup(:loaders), and the evaluator was changed to get the
loaders via the compiler instead.

The evaluator tests are changed to make use of the simplified
handling of the loaders.

The tests for the functions that have moved, were also moved, but
are unchanged in what they test.
(maint) Add leaky local scope tests

This adds tests that local and match scope handling is corrent
and does not leak variable bindings.
(PUP-2755) Fix issues after changes from PUP-514

This fixes merge issues that were not automatically done due to files
being moved and changed structurally.

The support for captures_rest was lost. This is now reinstated in
the shared IterativeSupport module and in reduce and slice where the
semantics of "serving_size" are slightly different.
(maint) Add doc stub for 4x function assert_type
(maint) Add 3x function doc stub for 4x function each
(maint) Add 3x function doc stub for 4x function filter
(maint) Add 3x doc function stub for 4x function map
(maint) Add 3x function doc stub for 4x function match
(maint) Add 3x function doc stub for 4x function reduce
(maint) Add 3x function doc stub for 4x function slice
(maint) Update function 'with's documentation with an example
(maint) Add 3x function doc stub for 4x function with
(maint) Remove dead test code
(maint) Fix stylistic issues from review
(PUP-2755) Remove special handling of iterative functions / cleanup

This fixes comments from review. It also removes the special
handling of the iterative functions (special case to avoid
having their arguments transformed) as this is no longer needed.
(maint) Fix stylistic issues from review of PUP-2755
(PUP-2791) Update docs for EPP syntax

The syntax for declaring parameters to EPP changed before it was merged
from <%- ($x) -%> to <%- |$x| -%> to make it consistent with the lambda
syntax. The docs on the epp and inline_epp functions still referenced
that old syntax. This updates those docs.
(PUP-2755) Mark function stubs as rvalue

The function stubs that are left in place to allow "puppet doc" to
document the new functions were supposed to issue an error when they are
used under "--evaluate current", but you couldn't call them in their
normal fashion because they were not specified as :rvalue functions,
which they used to be. This puts the rvalue flag back on so that if they
are called then they can produce the intended error message.
Merge branch 'pr/2765'

* pr/2765:
  (PUP-2755) Mark function stubs as rvalue
  (PUP-2791) Update docs for EPP syntax
  (maint) Fix stylistic issues from review of PUP-2755
  (PUP-2755) Remove special handling of iterative functions / cleanup
  (maint) Fix stylistic issues from review
  (maint) Remove dead test code
  (maint) Add 3x function doc stub for 4x function with
  (maint) Update function 'with's documentation with an example
  (maint) Add 3x function doc stub for 4x function slice
  (maint) Add 3x function doc stub for 4x function reduce
  (maint) Add 3x function doc stub for 4x function match
  (maint) Add 3x doc function stub for 4x function map
  (maint) Add 3x function doc stub for 4x function filter
  (maint) Add 3x function doc stub for 4x function each
  (maint) Add doc stub for 4x function assert_type
  (PUP-2755) Fix issues after changes from PUP-514
  (maint) Add leaky local scope tests
  (PUP-2755) Move iterative functions to the new API
  (PUP-1057) Remove the function stubs for collect and select