Create an independent dependency resolution script.

Calculates dependencies without using Closure Compiler,
to be used with alternate compilers and build tools.

Progress on #7 and #74.
This function is actually more general than that. It will flatten an n-level array into a 1-level array.