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`
Sure, that sounds right, it's only for us. But to avoid wasting time perhaps just make the extension method return a new configuration instead of null by default?