After [28883], ensure that priorities have callbacks before returning `true` in `has_filter()`.

Adds unit tests.

Props boonebgorges.
Fixes #29070.

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


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