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
Merge pull request #6733 from juho-jaakkola/datadir_migration_6202

perf(upgrade): ajaxifies data directory migration