The watch callback thread wasn't dealing with exceptions

This commit fixes this and also removes logging to stderr
in favour of a logging callback.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #10 from jonludlam/fix-watch-callback-thread

The watch callback thread wasn't dealing with exceptions