fix(cli): respect SIGTERM and SIGINT exit codes in next build (#64871)
This PR updates the SIGTERM and SIGINT exit codes to 143 and 130
respectively. These updated codes are what other tooling, such as
Nx/Turborepo, expects when running commands that did not completely
successfully due to receiving SIGTERM and SIGINT.
For Nx, the SIGINT (e.g. `Ctrl+C`) causes a bad build cache. Both Nx and
Turborepo will have bad cache when SIGTERM is received, which can happen
in a CI environment if a job times out, runs out of memory, etc.
I have a [repo here](https://github.com/jaysoo/next-cli-signals) that
demonstrates the wrong behavior with Turborepo. By exiting with the
wrong code, it can result in bad cache in CI or Docker.
Closes: https://github.com/vercel/next.js/issues/62906
---------
Co-authored-by: Sam Ko <sam@vercel.com>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>