Changed FOR UPDATE handling in Postgresql

Postgresql cannot handle FOR UPDATE with outer joins, but it allows
specifying which tables can be locked. This changes DatabasePostgresql
to render proper FOR UPDATE statements that only include the main
table and any tables in inner joins.

Bug: 47055
Change-Id: I1ac587ac39f448b9e7f4befb44826b43044ad6f0
(cherry picked from commit 63d32eeb6f23b68ed783d6f6b5c6b39067b6316b)
Merge "Changed FOR UPDATE handling in Postgresql" into REL1_22