Make update page with CSP compatible

- Moves inline JS from the update page
- Move `self::checkMaintenanceMode()` + `self::checkUpgrade()`

\cc @DeepDiver1975