Add WITH_EPOLL to easily switch between poll and epoll

This is for valgrind on ARM that doesn't handle epoll (yet).