`get_blog_details()->post_count` should update on more actions than just `publish_post`.

Adds unit test.

Props 5um17, midxcat, strangerstudios.
Fixes #27952.

Built from https://develop.svn.wordpress.org/trunk@28835


git-svn-id: http://core.svn.wordpress.org/trunk@28639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`return false` in `has_nav_menu()` if the `$location` does not exist in the `$_wp_registered_nav_menus` global.		

Props SergeyBiryukov.
Fixes #27735.

Built from https://develop.svn.wordpress.org/trunk@28836


git-svn-id: http://core.svn.wordpress.org/trunk@28640 1a063a9b-81f0-0310-95a4-ce76da25c4cd