(PUP-2176)(PUP-2035) Followup on function API / Puppet Functions

This fixes issues found when reviewing puppet functions / loader api. The issues are tangled - part function part loaders.

* defining and calling a function from the command line with puppet apply now works
* functions in modules are found from the environment as well from within a module
* the name constraint for puppet functions is lifted

This also adds lazy evaluation capability to the context since this was needed to enable the compiler's initial import to also be executing in a configured context but without causing performance degradation in all cases where features from the context were not used, and if that they were used, that they do not have to be initialized more than once for the same compiler.