Docs: Add refined string types for PHPStan.
Adds non-empty-string, non-falsy-string, and lowercase-string return types where a function always produces such a string, mostly taken from php-stubs/wordpress-stubs. Where PHPStan cannot infer the refinement from the function body, such as from a static cache or a sprintf() call, the type is asserted inline so that the narrower types introduce no new errors.
Registration functions now require a lowercase key where it is documented or validated as lowercase. This covers post types, post statuses, and taxonomies, as well as the names used by the abilities, block bindings, block types, block templates, connectors, and icons registries. Static analysis describes what callers should supply, so these follow the documented contract even where a function lowercases the key itself. Admin menu slugs are only narrowed to non-falsy-string: although they are documented as lowercase, established plugins register mixed-case slugs which appear in admin URLs and cannot be changed without breaking links. Script and style handles are left as plain strings for the same reason, since mixed-case handles are widespread and other code must pass them verbatim as dependencies.
The only runtime change is in wp_internal_hosts(), which now re-indexes the deduplicated hosts with array_values() so that it returns a list.
Developed in https://github.com/WordPress/wordpress-develop/pull/13892.
Follow-up to r55289, r64163.
Props marian1, swissspidy, westonruter.
See #65817.