Add test ensuring we do not lose binds on esoteric RSC+distinct

Test inspired by auditing cc2b92553 (a precursor of d2bd473084)
Read under -w
Massively refactor and sanify _extract_fixed_condition_columns

This work is based on d8b7d9f58..337f3ee80, which while taking the right
direction had too many loose ends. imlari++
The initial (now passing) test for RT#93244 (fixed in 1a44d630b)