Optimize batch sizes for migrations automatically
This issue is about adjusting the batch_size for batched background migrations based on recent history of jobs. The goal is to increase throughput as much as possible without overloading the database.