Remove router from subnets before globally

to avoid accessing freed memory
Add router to pairs

If the router is in the old subnet, add it to the pair of
old+new subnet (the router must be in the new subnet).
Clean up topo state when closing

We do not remove routers, subnets, or pairs when sending RIR
msgs, only when receiving. This cleans up efore sutting down.