Introduce `get_site_by()` function for multisite
|Reported by:||flixos90||Owned by:||flixos90|
|Component:||Networks and Sites||Keywords:||has-patch dev-feedback has-unit-tests|
As @stephdau mentioned on #40064, the new get_site() function from 4.6 is not a direct replacement for get_blog_details() which we are planning to deprecate.
Therefore I think it makes sense to introduce a function get_site_by() that is basically a wrapper for a WP_Site_Query (with LIMIT 1), and then runs array_shift() to only return the first result. This function would then become the direct replacement that people who previously relied on get_blog_details() with something other than an ID could use.
Parameter-wise, we should probably adjust it a little bit to match things like get_term_by(), which also makes the way that function works more explicit.