Summary:
Added `enable_object_locking_infra` PG auto flag and GUC to ensure table-level is enabled only after all nodes are upgraded. Both this flag and `enable_object_locking_for_table_locks` must be true for the feature to be active.
The reason we need it to be a PG auto flag with a GUC instead of a normal C++ auto flag is because the auto flag `enable_object_locking_infra` needs to be checked in PG backend first.
The new added auto flag `enable_object_locking_infra` is tagged as PGC_INTERNAL, so that users are unable to toggle it using the GUC.
Other changes:
Changed `enable_object_locking_for_table_locks` from runtime to non-runtime flag, as D44382 incorrectly marked as runtime when the flag is not meant to be changed at runtime.
Modified `TabletServer::StartTSLocalLockManagerUnlocked()` to always create `TSLocalLockManager` object when YSQL is enabled, regardless of the `enable_object_locking_for_table_locks` flag value. This allows the lock manager to be available when the auto flag is promoted during upgrade. With this change, it is also required to updated function
```
[[nodiscard]] bool IsObjectLockingEnabled() const { return ts_lock_manager() != nullptr; }
```
to also check both `enable_object_locking_for_table_locks` and `enable_object_locking_infra` flags, ensuring object locking is only used when both the feature flag and auto flag are enabled.
Jira: DB-18595
Test Plan: Jenkins
Reviewers: bkolagani, esheng, rthallam, amitanand
Reviewed By: bkolagani, rthallam
Subscribers: svc_phabricator, ybase, yql
Differential Revision: https://phorge.dev.yugabyte.com/D47391