WIP: Improvement/js optimisation

a general cleanup of the way JS + require is used in the project. 

- Separation of core elements into a common module which other modules can then depend on
- Refactor analytics so it can sit in core, with "analytics" module becoming specifically "scroll tracking" and relying on common to publish the analytics event

@benbarnett @alexwllms @aduggin @andrewgarner