mtest: improve handling of SIGINT and SIGTERM
mtest: improve handling of SIGINT and SIGTERM

Handle SIGINT and SIGTERM by respectively cancelling the longest running
and all the running tests.

QuLogic/meson,pexip/meson,mesonbuild/meson,pexip/meson,mesonbuild/meson,jpakkane/meson,QuLogic/meson,pexip/meson,pexip/meson,jpakkane/meson,jpakkane/meson,pexip/meson,mesonbuild/meson,pexip/meson,QuLogic/meson,mesonbuild/meson,QuLogic/meson,QuLogic/meson,jpakkane/meson,mesonbuild/meson,QuLogic/meson,mesonbuild/meson,QuLogic/meson,pexip/meson,QuLogic/meson,jpakkane/meson,pexip/meson,mesonbuild/meson,jpakkane/meson,jpakkane/meson,mesonbuild/meson,pexip/meson,QuLogic/meson,mesonbuild/meson,pexip/meson,jpakkane/meson,jpakkane/meson,mesonbuild/meson