(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.