watcher: add a centralized an generic facility to monitor file descriptors