Interplay between structural, magnetic, and electronic states in the pyrochlore iridate Eu2Ir2