Use epoll instead of select on linux

This removes the use of the select system call for I/O and
uses epoll on Linux systems. This removes the limit of 1024
open files that select has and provides better performance.