Optimal self-calibration and fringe tracking in photonic nulling interferometers using machine learning