Add support for read timeout

the wait method now has a third argument: timeout on read, this setting will be set temporally when used. if timeout is set to 0 (default) then no timeout is applied (BC).

This feature is useful if you want to add timeout on RPC calls