Summary:
To guarantee same lock order for system catalog objects we acquire locks for objects of the same type in the order of their ids.
CreateNamespace does not follow this pattern.
It leads to potential deadlock.
Fixed by creating tables when copying namespace in the order of their ids.
Jira: DB-15497
Test Plan: ./yb_build.sh tsan --gtest_filter PgDdlAtomicityTest.TestDatabaseGC -n 40
Reviewers: zdrudi
Reviewed By: zdrudi
Subscribers: ybase
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D42323