Run preupdate before an update

The update routine tries to test the database migration before actually performing the update.

However, this will fail hard if the schema has changed (for example an unique key has been added). App developers can convert the DB in preupdate.php, however it is not called before and therefore the update fails.

This actually breaks ownCloud updates from ownCloud 6 to ownCloud 7 when the files_antivirus app is enabled. This change is related to https://github.com/owncloud/apps/pull/1970

@karlitschek This is kinda important.... :-/
Please "sandbox" inside a separate function to avoid namespace bleeding