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.
Merge pull request #10534 from owncloud/autotest-cleanuponinterrupt

Restore autotest config on SIGINT or SIGTERM