[DO NOT SUBMIT]
This is a mega commit removing quadratic code paths from node
additions/removals. I'm plucking individual pieces out of this to send
as small PRs to land separately.
Updates #12542
Change-Id: Iccc5258024e6f90311835b79fd2d83b2adb0d09d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>