First round of bugfixes in custom eventloop
First round of bugfixes in custom eventloop

Acidburn0zzz/getdns,shane-kerr/getdns,smogali/getdns,huitema/getdns,shane-kerr/getdns,smogali/getdns,smogali/getdns,shane-kerr/getdns,Acidburn0zzz/getdns,Acidburn0zzz/getdns,huitema/getdns,shane-kerr/getdns,smogali/getdns,huitema/getdns,Acidburn0zzz/getdns,huitema/getdns