Added proper code for new maintenance mode feature.
Tweak maintenace mode handler.
Added clear compile pre update script.
Fix comment. Closes #1958.
Tweak composer commands. Closes #1954.
merging in upstream

Signed-off-by: Daniel Berry <danie@danielberry.me>