Disable pre/post prepare hooks during upgrade

Now with event based hooks we can temporarily disable them. This save
unnecessary runs, as well as some time and confusion during upgrade.