hub: implement event.clear for topology/switches
hub: some tests
hub: fix event