Refactor recurisve module compile with promises

Refactored recursiveModuleCompile to return a promise, with some other simplifications targeting ease of understanding.

Refactored other code that uses recursiveModuleCompile to use a more natural promise style.
Maybe 
f A function applied to each item on the list.
This function doesn't care where f() gets the Promise it returns.