[JENKINS-21919] Extension point to define actions when timeout

This provides general mechanism to add command execution (#10), email sending (#13) and so on.

~~DO NOT MERGE: I have to add tests, especially to test regressions. I'll do this in another ticket and pull request.~~ Tests added.