Wide swing cascode current mirror
what is the significance of the connection from the drain of M3 to the gate of M1 and M2?

That connection is part of the feedback loop which sets the Vgs of M1 and M2.
If M1 (and also M2) have an Id > Iref, the voltage at the drain of M3 drops.
This decreases the Vgs of M1 (and also M2) restoring the balance Id_M1 = Iref

What would happen if both M3 and M1 were diode connected MOSFETs?

Then the circuit becomes quite different. M5 would not serve a purpose anymore. The circuit would become a simple cascoded mirror. The minimum voltage at the drain of M4 needed for the correct output current would also rise. That is one of the things this circuit improves.