Spike/api hyperagent

https://www.openproject.org/work_packages/8319
https://www.openproject.org/work_packages/11927
i didn't have a very good experience with require.js last time i tried to use it. that was a long time ago though. anyway i'm not going to do it in this PR.