Fixes #23837: Replace list.pop(0) by deque.popleft() in dfs function in migrations
Merge pull request #3536 from Zweedeend/ticket_23837

Fixes #23837: Replace list with deque in migration-planner for improved performance.