DisplayPollThread: Avoid data race issues.

DisplayPollThread uses member variables like active to determine when to stop
polling. This variable is set in Main thread and read from the worker thread
and leads to potential undefined behaviour. To avoid data races, we use a
WaitableEvent to signal when the polling needs to be stopped. Also the epoll
creation and deletion has been moved to worker thread completely.
PollThread: Add error checks and print error log.