This involves adding some infrastructure to parse pg_control in a reasonably version-independent fashion. This will probably be useful in other contexts where we need to verify the status of a data directory where the instance isn't running.
Refactor superuser connection detection.
repmgr3's repmgr.c file was not far off 10,000 lines - this will make it easier to manage individual parts of the code.