Add timeout option
This PR adds a simple timeout option to the library. It's not the ideal end solution, which would allow developers to indicate their own timeout, perhaps when instantiating the library, but it's a good start. #56
@slimkrazy -- Thanks for the great library! We are trying to start using it in our application at the moment and the lack of timeout configuration is a big blocker. Any plan to get this merged? This is very important for production applications because as of right now there is usually no timeout for this call.
The optional timeout parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be used).
https://docs.python.org/3.1/library/urllib.request.html
The global default is None (no timeout): https://bugs.python.org/issue18417