Summary:
This diff reverts changes made by the https://phorge.dev.yugabyte.com/D40460 diff and implements
alternative solution. Also the following scenario is fixed
```
CREATE TABLE pk_t(k INT PRIMARY KEY);
CREATE TABLE fk_t(k INT PRIMARY KEY, pk INT REFERENCES pk_t(k));
BEGIN;
SAVEPOINT s1;
INSERT INTO pk_t VALUES(1);
ROLLBACK TO SAVEPOINT s1;
INSERT INTO fk_t VALUES(1, 1); -- Expected to fail
```
Jira: DB-14251
Test Plan:
Jenkins
```
./yb_build.sh --gtest_filter PgLibPqTest.InsertOnConflictWithQueryRestart
./yb_build.sh --gtest_filter PgFKeyTest.SubtransactionRollback
./yb_build.sh --gtest_filter PgFKeyTest.DeferredConstraintWithSubTxn
```
Reviewers: patnaik.balivada, pjain, telgersma, kramanathan
Reviewed By: pjain
Subscribers: yql
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D40891