Refactor http_io to not use iochan_setevent