src: use new loop API

uv_loop_new and uv_loop_delete are considered deprecated now.