Efficient numerical integration of neutrino oscillations in matter