fix startup sequence of the javascript

main pulled in Api.js which immediately send off a request to cache the project
names. at this point in time, no csrf token was set and the first request failed.

we now cache the data on the first project fetch and replace the old function
with a cachung wrapper.
remove getGlobalModules call in frontend

this was legacy code and never used
add missing index.json.phtml

otherwise, some calls always fail since we use action context switching
Merge pull request #360 from exi/startup-and-context-fixes

Startup and action context fixes !!!IMPORTANT