Static js dependency fixes

@dchambers one for you to review.

- NamespacedJS classes are now wrapped in a define block
- Added requireAll to bootstrap
- All NamespacedJS classes are globalised at the end of the bundle
- Dashboard loads and all tests pass :smile: