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.
Good to know. I tend to create all code as privately as possible but hadn't thought about the memory implications here.