Update recovery data after changing password

Fixes stellar/ix#421.
Since this function is getting a little hard to read it might be a good time to organize some of this logic into helper methods.