Restore autotest config on SIGINT or SIGTERM

When hitting Ctrl+C to interrupt unit test running, the old
configuration was not restored properly.

This fix traps the signal to properly restore the configuration after an
interruption.

Note: this is for people like me who run their unit tests on the command line :smile: 

Please review @DeepDiver1975 @th3fallen @schiesbn