Implement timeouts

When running this in massive production we noticed that from time to time server on the other side just freezes the connection (but keeps it up!). You can imagine that's not good since it means our code freezes too.
So this is minimal implementation of timeouts for subscription requests.