Use Closure to sort dependencies.

No need to use its JSModule class directly; we can make SourceFiles (they don't actually need to be files...).