RAII C++ types have been added to make working with libuv primitives bearable.
Carry over from !1230 (merged)