Fixed #24014 -- Unified OGRException and GDALException

Thanks Tim Graham for the review.
Refs #24020 -- return expressions from get_group_by_cols()
Fixed #23788 (2) -- Improved gettext version checker

Thanks Tim Graham for the report and initial patch.
Removed need to update Python version support note on each new release.
Forward-ported test and release note from f46a16614

Refs #24015.