Perform data migrations in a background thread

Change-Id: Ib9b8cf712b38989af327fba205cf9f6a96466c1e
Merge "Perform data migrations in a background thread"