Flickering of cardiac state could provide early warning for onset of atrial fibrillation