Fix the `site-details` cache not being set sometimes
|Reported by:||flixos90||Owned by:||jeremyfelt|
|Component:||Networks and Sites||Keywords:||has-patch has-unit-tests|
When introducing the lazy-loading functionality for sites in 37918, we made a mistake as far as I can see: In WP_Site::get_details() we check for falsy site detail values, and if one of them is false, the data is not cached. This is a problem, since sometimes that data can actually be not set (mainly post_count).
When reading through the original ticket #36935, the reason we implemented this check was so that the function wouldn't cache an invalid dataset when requesting site details too early (for example in sunrise.php). However, a little further in that discussion we decided that we'd introduce the ms_loaded hook and use that for detection instead. That's what we ended up doing, but never removed the original checks, which should under those new circumstances be unnecessary, and actually cause this problem.