Add timeout parameter to constructor of clients in python and ruby: fixes #359