Adds requirejs loaded flag

When requirejs has loaded a CSS class "require-loaded" is added to the
body element. This is used in the tests to detect loading of requirejs
before running additional JS.