We were previously aborting the main event loop before calling fish_exit
in the event of a SIGHUP. This patch causes the SIGHUP to be stored in a
separate state variable from a regular "must exit" condition so the
associated event can be fired before we terminate the loop.
All streams are redirected before the event is called to prevent a
SIGTTIN/SIGTTOU due to the user script reading/writing from a disposed
tty.
Closes#7014
This patch keeps the existing `make` shims via `GNUmakefile` and
`BSDmakefile` but also resolves the issue reported in #6264 with
CMake-generated `Makefile` overwriting the extant `Makefile` causing the
source directory to become dirty once again.
Closes#6264