Ensure batched background migrations admin interface is multi-database aware

Extracted from !84764 (comment 910045400)

The batched background migration interface will need to be designed to query the tracking tables in the ci and main databases to get all tracking data. Once we finish ci-decomposition all of the tracking tables will exist in 2 databases and they will each be tracking different migrations (those for main related tables and those for ci related tables). If we don't specifically handle this then after we decompose the database you will not see tracking information for any of the ci related migrations.