Wrap the libuv into cmocka mock object for the unit test
On *BSDs, the libuv is more unreliable than on Linux and it could return intermittent errors about not enough file descriptors, port binding and etc.
As we need a more reliable way how to test that, we need to wrap the libuv library calls into mock objects, and simulate the failure programatically.