HPCC-9415 Use epoll - critical section around init code added

Signed-off-by: Mark Kelly <mark.kelly@lexisnexis.com>