Prevent hang/delay on exit.

Before this it was possible for pthread_join to hang waiting for
threads to finish. Also if there was no input data exiting was
delayed by a second.

After this patch the exit is instant even if there is no input data
and if a thread hangs and the main process can't stop it after two
seconds tsdecrypt exits anyway.
Increase how much seconds to assume the key is valid.

10 seconds is a bit low, there are services that change their key
every 15 seconds. Increase the period in which we assume the key is
valid to 30 seconds.