Make single file output reliable (but not faster)

* previously the compiler would use whatever file ordering it saw most
recently which would lead to the output being the wrong order until
after a reboot or project clean. now the files should always be in the
proper order (at the price of the compilation taking longer for single
file output)
* previously if a definition file (*.d.ts) happened to be the one file
picked to "compile", the output would not be compiled. now the single
file will be compiled every time
* the clean file logic was also inappropriate for single file output