CA-102259: Refactor xenstore-watching code into separate module

(This supersedes pull request 1112.)

The new xenstore-watching module is used in the fix to CA-101580, included in this patch series. It will also be used by rrdp-squeezed in the perf-tools.hg repository.

It would be nice if someone familiar with squeezed did a review of commit 0ab61fa that slightly changes its semantics.