Since struct/unions are defined in _preload functions, make sure typedefs of arrays of structs are also defined in _preload functions.
Lots more changes; fixed dependency issues in generated JS (really this time) by intelligently recreating dependency graph in JS output. Fixed many other issues (w/ c++ code & JS code).