Factory reset upon unlocking
I do not know of any application that does what you request. Maybe "After Unlock" has a feature like that. 

What I would do is make an Android application that is fired after unlocking the phone. The application would request a new password and if it is entered correctly do the factory reset and format the SD if needed. 

Check this project for an example of how this could be done: myLock