The Lord of the region is able to close down a ruined temple. However, mind you that it can have consequences when there's still much followers.
I don't see a way to upgrade a ruined temple. You need to close it and rebuild it.
If you have suggestions on how it should be possible to revive a ruined temple, don't mind posting a Feature Request under the designated forum.