base: requirejs improvements
base: requirejs improvements

* Several improvements for better requirejs compliance.

Signed-off-by: Javier Martin Montull <ea6b80e26c65acc242d8916fb6eefa01b123cb69@cern.ch>

inspirehep/invenio-accounts,inveniosoftware/invenio-accounts,tiborsimko/invenio-accounts,tiborsimko/invenio-accounts,inspirehep/invenio-accounts,inveniosoftware/invenio-accounts,inspirehep/invenio-accounts,tiborsimko/invenio-accounts,inveniosoftware/invenio-accounts