fix(amd): avoid .js suffix that requirejs adds to paths by default

Fixed using this method: http://stackoverflow.com/a/15392880
feature(lightbox): be able to require lightbox from javascript

Added lightbox as a shimed AMD module. It shouldn't affect BC.
feature(embed): be able to require elgg.embed js from javascript

Registered js as shimed AMD module.
fix(embed): embed wasn't working in activity page

Refactored the library loading in order to be able to use lightbox and
jquery.form in an already loaded page, when an input/longtext is loaded
via ajax.

Fixes #6422