Thermodynamic stability and kinetics of perovskite dissolution