Rework existing PR https://github.com/postgrespro/pg_query_state/pull/16 and migrate current python tests to [testgres](https://github.com/postgrespro/testgres) Postgres testing framework.