they look to be in amazing condition!
but i totally know how you feel, it can be very heart wrenching to see the friends that got you such hard times in any other condition than pristine *hug*
i think the suggestions of the basic cleaning first would be the best place to start. a gentle wash with a mr. clean magic eraser, some condtioner in wet hair and a gentle combing and go from there. for the bent out of shape ones i know there are tutorials as have been posted for warmin them up and repositioning them.
but i think your herd is amazing, some very nice and gorgeous ponies in there that should clean up really well.
they look a lot better than most of my herd lol