Commonize code to limit functional tests to a single site each

@harshgMSFT @yishaigalatzer 

We should be doing this as boilerplate in all of our test sites or controllers start to leak across depending on the order of execution.


This is the best way I found to do it. Registering the service before calling `AddMvc()` is a no-op because `AddMvc()` will replace it. I didn't want to mess with implementing a custom `ILibraryManager`
ya, need to figure out how to get git to care about this. I fixed it a bunch of times and git doesn't see it as changed :frowning: