[backend] return 'delayed' when an aggregate has to be delayed

Fixes the scheduler looping over the same project.
[webui] avoid multiline status lights for a partition
[api] refactor application controller
[api] avoid duplicating the usernamd and password in all tests

Just use helper functions