added longpoll support and improved pool mining