Javascript component loader - dependencies / error trapping

If one component is dependant on another, create the dependency first.

Errors thrown by a component's initialisation shouldn't stop other components being initialised