Move start of the maintenance mode to the ajax call

Make sure the update page is shown in a browser. And not an ajax request
Connect watcher failure function to the failure signal
Also check for needed upgrade in the Sabre Maintenance connector
Turn off theme before update
Add undefined verision variables
Merge branch 'master' into move-maint-start
Clear opcode caches after writing to the config file, fixes #3372
Merge branch 'master' into move-maint-start

Conflicts:
	lib/util.php
Merge pull request #2835 from owncloud/move-maint-start

Move maintenance start to ajax call