First off... astrea snails can't really turn themselves back over. So most likely in that first picture the snail was already dead. If you see an upside down snail, it's best to turn it right side up again and send it along its way.
Now to the coral. Can't really tell from the pictures, and I'm no expert on Goniopora (flowerpot), but it either looks like cyano
or a brown jelly infection. I'd put my money on brown jelly infection. I'd get it out of your tank immediately into a quarantine tank because brown jelly can spread to other corals quickly. I'd probably try to bag it underwater (zip lock bag) so as not to spread the gunk as you pull it out. Not sure how to treat it though - maybe some others will chime in on that.
From all I've read, Gonioporas have a dismal survival rate in our tanks.