Move checkMaintenance and checkUpgrade

This is needed to ensure that the routing and linkTo() function for CSP
are available.
Move update inline JS
Update config/config.sample.php

added parameter mail_smtpauthtype to set SMTP authentication type.
Update lib/mail.php

added parameter mail_smtpauthtype to set SMTP authentication type.
Fix undefined variable
Remove outdated comments
Use HTML5 data attribute + fix undefined variable
Add create permission, fixes #780
Merge pull request #1337 from owncloud/fix-issue-780

Add create permission, fixes #780
Merge pull request #1321 from owncloud/csp-fixes

Files: CSP fixes
Merge branch 'master' into updater-CSP

Conflicts:
	core/templates/update.php
Merge pull request #1318 from j-ed/master

added parameter mail_smtpauthtype to set SMTP authentication type.
Merge pull request #1313 from owncloud/updater-CSP

Make update page with CSP compatible
Fix phpdoc
merge master into filesystem