Kill poller_thread before waiting for it to die

When stopping, each adapter needs to kill its poll thread before it
can wait for it to exit - this ensures Guard can quit reliably without
hanging.
Merge pull request #113 from antifuchs/kill-poller-thread-before-joining

Kill poller_thread before waiting for it to die