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.
Tests are always welcome, but not required for refactoring. These functions
are called during our build and test process so 'feature' level testing
occurs for the main paths. We don't use 'inline' ourselves hence the bug in
that path.

On Fri, Dec 12, 2014 at 5:53 PM, brianchin <notifications@github.com> wrote:
>
> In src/node/recursiveModuleCompile.js
> <https://github.com/google/traceur-compiler/pull/1586#discussion-diff-21784734>
> :
>
> > @@ -73,7 +70,7 @@ function forEachRecursiveModuleCompile(outputDir, includes, options) {
> >      if (current === includes.length)
> >        process.exit(0);
> >
> > -    recursiveModuleCompile(includes.slice(current, current + 1), options,
> > +    recursiveModuleCompile(includes.slice(current, current + 1), options).then(
>
> Using Promise.all instead, as it seems that order of evaluation/completion
> doesn't matter here. If this isn't the case, I can change it to use
> sequencePromises instead.
>
> In other news, I found out that this function is not covered by the
> current suite of tests. Do you want me to add a test for this, or do this
> in another pull request, or is it okay for now?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/traceur-compiler/pull/1586/files#r21784734>.
>