Longpolling support

Added support for longpoll getwork requests.