Move logic to Elgg_RequireJS, added to service provider.
Fixes module loading in subdomains
Avoids fatal if no module added before foot rendered
Avoids duplicate deps
Rename RequiresJS to AmdConfig, move base_path logic out
Make simplecache built on demand by the cache handler, reimplemented in class
Clean up
Merge pull request #525 from mrclay/pr523

Move AMD logic to Elgg_AmdConfig