Media: Ensure get_post_status() returns correct result for attachments.
Prevent get_post_status() returning false for attachments if the parent post has been deleted. The returned attachment post status is now passed through the get_post_status filter.
Add tests for get_post_status().
Props peterwilsoncc, timothyblynjacobs for review.
Fixes #52326.