Lie symmetries, conservation laws and solitons for the AB system with time-dependent coefficients in nonlinear optics or fluid mechanics