This patch fixes the device removal order when a connection is closed, which allows HAL to see the remove event and prevents a bunch of duplicate devices from piling up and eventually hitting the limit for the for input devices in X. Posting for discussion since I used a polling loop (with a sleep) to wait for child devices to go away. I assume it'd be preferable to wait in a more proper way. In that case, before I start, is this the right place to be waiting?