Adjust the sub_batch_size in background migrations if we get a query timeout exception
From this discussion !99391 (comment 1126467083) it would be good for background migrations to be able to reduce the sub_batch_size
in the event of an SQL query timeout. We currently split and retry failing batches, but the split is done at the outer batch level, so that will reduce the number of records in a batch, but for the remaining records we might still issue queries the affect too many rows in a single call because of the sub batch size