Topic/instance switcher

Opening this at Mike's request. The feature basically works, but there are a few fatal crashes that I'm still working through, which will get fixed before this is merged.

Please disregard the first two commits, they mirror each other. This was used as a way to check in inbetween changes, but continue to edit them in the staging environment, by backing them out. This will not be merged.
It's used 3 times, it's slightly different each time. I had some problems with the algorithm I copied, so I enhanced it to try out other providers if the best provider fails. I left a TODO to backport it, but first I want to make sure it works just right.