Javascript module loader update

Html helper changed to load requirejs at the top of the page. This
removes the need for a local array of dependencies and load them as soon
as they are declared. This change allows to load dependencies inside
elements.

Menu wrapped in elements can now call their own js module dependency.