src: Implement timeout using UserInterrupt exception.

This seems to be the only way to make QuickCheck stop shrinking
after timeout.