perf(upgrade): ajaxifies data directory migration

This allows upgrade.php to complete more quickly by moving the
user data directory migrations to a separate page with an
ajax process.

Fixes #6202