(PUP-2035) Fix issues with loader configuration
During the review of the functionality for PUP-2035 it was discovered
that it was not possible to call a function in a module from the
environment. This was due to the initial configuration, and that the
evaluator used the wrong loader.
This commit fixes the logic so that:
- the environment loader is now split into two parts, a public (sees
only things in the environment), and private (the public + all modules).
- a module loader is parented by the public_environment_loader (does not
see all modules - only those it depends on).
- functions defined outside of a module are added to the public loader
(i.e. from the command line, or site.pp)
This fix is needed to be able to evaluate PUP-2176