(PUP-2176) Restrict puppet functions to module namespace

This changes the mapping from function names to puppet function definition file such that:

* semantics are the same as for classes and defines (i.e. not nested under repeated module name dir)
* puppet functions must be name spaced in the correct module