I have heard it stated before, but here it is from various sources:
Source 1
Source 2 (confirms the shake test)
Source 3
In general, the air pocket in an egg gets bigger as it gets older due to the permeability of the shell. I think the shake test is a little hinky, unless it actually sounds like water sloshing. I would try the float test; fill a bowl to twice the height of the egg, and place it in. If it sinks to its side, it's fresh. If it stands on its end, it's probably good, but needs to be used quickly. If it floats, toss it.
If the shell is undamaged, and the eggs are not past their expiration/best by date, they are safe to eat. Official source: your government's food safety agency, unless you live in a place with really really lax food regulation. But your profile says Australia - I'm sure things are fine there. If there are problems with salmonella outbreaks, it's not anything that you can detect. A salmonella-contaminated egg will look exactly like an uncontaminated one - that's why governments generally recommend you cook the egg, which will kill the salmonella and make it safe. If you're eating raw/undercooked eggs, you'll have to decide whether the risk where you are is low enough.
In practice, they're actually safe for a while after the best by date, just not as fresh, and if the shell is cracked without damaging the membrane or they were very recently cracked, they're also safe. But no damage and before the date is the most absolute guarantee you can get.
The two tests you mention will help you get some idea how fresh the eggs are. Neither has anything to do with good vs. rotten. As eggs get less fresh, they dry out a bit, forming a larger air pocket. So they'll slosh more, and start to float.
But it doesn't mean they're rotten. An actually rotten egg would be completely obvious by smell - they're sulfurous, a lot like the smell that's added to natural gas. If you're getting eggs that float in water on the day you buy them, with really obvious sloshing, yes, it means they're not fresh, so they're certainly not good as fresh eggs from a farm. So if that's the case, your supermarket isn't selling you good quality eggs. It doesn't mean they're unsafe, though.
As for "Why do most eggs have crap and blood on them?" ... "most" is a huge exaggeration, the places I've seen - they get washed. And as rumtscho pointed out in the comments, the eggs are coming out of a chicken, so some ugly stuff is natural. You never actually said what your eggs look like, but if you live in a place where they're not cleaned (even before selling in a supermarket??), then it still doesn't mean they're unsafe, just that you should probably clean them before cracking them.
And dark spots? Some eggs are naturally speckled - that'd be fine. If it's something else, I guess it would be helpful for you to provide a picture.
Best Answer
According to http://www.eggsafety.org/consumers/consumer-faqs, black or green spots inside the egg are the result of bacterial or fungal contamination of the egg.
The use by date is only an estimate, so if your eggs are moldy, I'd bin them.