Optimize public_trial upgrade steps so we only rebuild indexes once.
Fix mail upgrade steps so they can safely be run a second time.

Also deal with the broken tuple schema when setting defaults.
Merge pull request #475 from 4teamwork/lg-merge-public-trial-upgrade-steps

Merge public trial upgrade steps