Resolve and sort dependencies locally during link time.
Resolve and sort dependencies locally during link time.

jsplink now emits functions depth first, starting with Main.main. This has
the consequence of eliminating any unused functions, as well as sorting the
functions in dependency order.

jsplink only deals with a single .jsmod file for now though.

jtojnar/haste-compiler,nyson/haste-compiler,joelburget/haste-compiler,kranich/haste-compiler,kranich/haste-compiler,santolucito/haste-compiler,akru/haste-compiler,nyson/haste-compiler,beni55/haste-compiler,santolucito/haste-compiler,crodjer/haste-compiler,jtojnar/haste-compiler,beni55/haste-compiler,szatkus/haste-compiler,santolucito/haste-compiler,beni55/haste-compiler,crodjer/haste-compiler,kranich/haste-compiler,nyson/haste-compiler,szatkus/haste-compiler,santolucito/haste-compiler,joelburget/haste-compiler,nyson/haste-compiler,crodjer/haste-compiler,crodjer/haste-compiler,akru/haste-compiler,jtojnar/haste-compiler,crodjer/haste-compiler,beni55/haste-compiler,szatkus/haste-compiler,joelburget/haste-compiler,szatkus/haste-compiler,joelburget/haste-compiler,akru/haste-compiler,akru/haste-compiler,jtojnar/haste-compiler,akru/haste-compiler,kranich/haste-compiler