Evolution of structure and magnetism across the metal-insulator transition in the pyrochlore iridate (Nd1-xCax)2Ir2O7