Formalized Class Group Computations and Integral Points on Mordell Elliptic Curves