Avoid pinging wordpress.org when running unit test test_upgrade_complete_set_xhtml_mode()

Call the thematic_upgrade_complete() function directly instead of
calling do_action. There are other actions attached to that hook that
we don't need to do.
Set timeout of thematic_upgrade transient to one hour

User will be unable to remove the legacy mode while the
transient exists.
Call legacy activation function from thematic_upgrade_complete()

DRY.
Update docbloc and code documentation of upgrade.php