Theoretical modeling of cardiac homeostasis and long-QT arrhythmias