Clean shutdown of DirPoll when file processing is in progress

DirPollAdaptor does not wait for the dirPoll thread to finish during shutdown. This can cause a dirty shutdown if the dirPoll thread were in the midst of processing a file. 
This change makes the shutdown wait for the dirPoll thread to exit in a graceful manner to good extent and then interrupts the thread if still running