Move pgbouncer failover into library prior to enhancement
Prior to adding an enhancement to the PGBouncer watcher failover script scheduled in #6587 (closed), the plan is to move this script into a library.
This gives us a few benefits:
- Allows us to add unit tests
- Allows the removal of some of remaining
repmgr
functionality - Facilities discussions around the check code that are not directly related to the task at hand to allow multiple Postgres watches