Improved memory management in the common/exit module.
Improved memory management in the common/exit module.

Refactor so that error detail is only logged in one place. This reduces calls to exitErrorDetail() and LOG_INTERNAL_FMT().

Fix minor leaks in exitErrorDetail() and exitSafe().

pgbackrest/pgbackrest,pgbackrest/pgbackrest,pgbackrest/pgbackrest