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>