check_tcp: use receive timeout for checks that expect response

if check_imap expects a string that never occurs, it currently waits forever
because thats how the imap protocoll works. Use a receive timeout in that case
so we can exit early with a proper error message.