bugfix: ensure updating the list of trees when removing one of the root nodes
minor cleanings + use select to honor the timeout if no filedescriptors are in the mux

when calling iomux_run()