Add socket dup function.
 This function can be used for multithreading servers
 by creating multiple scheduler and adding duplicated sockets
 to each of them. Schedulers are running the same underlying socket
 with no locks. Epoll handles locks for us.