Fix the random worker selection algorithm to work correctly with WQ4.0.
Lower the wq_wait() timeout to 5 seconds.
Add missing Python bindings for WQ4.0.