Controlling mean exit time of stochastic dynamical systems based on quasipotential and machine learning