Amd module return values

This is a rewrite of pull request #377 

If building AMD module output and only one template/partial, return that compiled template as the module output. If building AMD module output and multiple templates/partials return the full hash of templates/partials.