Do progress bar update in an AsyncTask

Part of FB 132314: Allow disable of progress bar.

No changes to the calculation, just moving it into a task.