Add tests for resource method within puppet functions

Although I've not been able to find any documentation about it, sample runs
show that when `resource` method is called within a function, the output differs
depending on the function caller.

In particular, when called on top level it is Class[main], when called within
a node definition Node[hostname], and when called on a class Class[class::name].
Set main scope for function calls
Fix function call on node scope
Allow specification of a class to run functions on
Add tests for parent_module_name
Fix module_name tests out of class
Add examples for module_name on first level module class
Add test for function call on subclasses
Merge branch 'feature/parent_module_name' into old_master