Move back applications

This moves back the `applications` code that was moved to `facia` back to `applications`.

`Facia` still takes the load for applications, but issues `X-Accel-Redirect` to `/applications/$path` which applications then takes.

As code such as `IndexController` has existed in both projects for some time, with the `facia` version being the correct one, they have become out of sync, and this is the reason there are modifications to the `applications` code.