CA-102259: Refactor xenstore-watching code out of xenopsd

This code is potentially reusable by other components, so this patch disentangles the xenopsd-specific stuff from the generic xenstore-watching stuff.

Summary of the refactoring, from the point of view of xenops_server_xen:

 * Split IntMap watches into IntSet watches (domains being watched, moved to xenstore_watch) and IntMap device_watches (list of devices watched per domain, kept)

 * Moved several functions into xenstore_watch's new WATCH_ACTIONS interface:
    - the code that does an action depending on which watch fired (to watch_fired, also including fire_event_on_vm and fire_event_on_device),
    - renamed all_domU_watches (to interesting_paths_for_domain),
    - the device-specific bits of remove_domU_watches (in domain_disappeared, which also inherited the content of cancel_domU_operations),
    - definition of unmanaged domain (in unmanaged_domain), and
    - definition of what we want to do each time we notice a domain running (in found_running_domain).

 * Moved to xenstore_watch's WatchXenstore module:
    - list_domains (verbatim)
    - domain_looks_different (verbatim),
    - list_different_domains (verbatim),
    - watch_xenstore, with the following changes:
       (a) rename {add,remove}_domU_watches to {add,remove}_watches_for_domain (but don't take the device-specific bit in remove_domU_watches)
       (b) call the functions listed above through WATCH_ACTIONS, and
    - the code that creates the watch_xenstore thread (to a function "create_watcher_thread") (verbatim).

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Signed-off-by: David Scott <dave.scott@eu.citrix.com>