Gradient flows and variational principles for cardiac electrophysiology : Toward efficient and robust numerical simulations of the electrical activity of the heart