Route registry enhancements
- [x] Read the Contributing document.
Summary
Rework some of the route registry logic to reduce nested ifs and align some of the logic.
Backward Compatibility
Breaking Change? No
We've validated this in one of our environments and the metrics now show up with the "refreshed" tag. As expected, the number of route messages labeled as "updated" went down a lot as those are now "refreshed". The logs also behave as expected with the refresh logs (which have a high volume) being not emitted if you set the log level to info.
We also ran the routing-release test suite for gorouter and it passes.
One more thing: We log the registration of new routes very deep in the code (in insertRouteKey), but we log the removal of routes in the public function (Unregister). Can we have it both on the same level, ideally in the public function?