Fix LOCK_DEBUG in LWLock acquiring
Fix LOCK_DEBUG in LWLock acquiring

Commit ea9df812d8502fff74e7bc37d61bdc7d66d relaxes the requirement
that all LWLocks are in a single array, which broke the LOCK_DEBUG
code for trying to acquiring an LWLock. This is a meatball surgery
attempt at making it at least compile and run, without trying to
reinvent the old usecase.

Minor tweaking of the code is also done to make LOCK_DEBUG cases be
identified identically.

Reported-by: Simon Gao in Github issue #7251
Reviewed-by: Ashwin Agrawal

xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,lisakowen/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,lisakowen/gpdb,adam8157/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,adam8157/gpdb,jmcatamney/gpdb,xinzweb/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,ashwinstar/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,50wu/gpdb,jmcatamney/gpdb,lisakowen/gpdb,adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,xinzweb/gpdb