Allow pseudo post types `attachment:audio` and `attachment:video` to get the media modal on Edit Media when they support featured images.

Introduces `post_supports_thumbnails( $post )` and `theme_supports_thumbnails( $post )` to cut down on duplicated code everytime this needs to be checked. There will be more cases forthcoming.

See #26631.


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


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