pg_resetwal: Prevent division-by-zero errors
Handle the case where the pg_control file specifies a WAL segment size
of 0 bytes. This would previously have led to a division by zero error.
Change this to assume the whole file is corrupt and go to guess
everything.
Discussion: https://www.postgresql.org/message-id/
a6163ad7-cc99-fdd1-dfad-
25df73032ab8%402ndquadrant.com