follow PEP-8
Using queues. Fixed bug with redirects.

Threads are created at startup and are reused.
Links with 301 redirection will now work.
Locks are replaced with queues.