A Transformer-based survival model for prediction of all-cause mortality in heart failure patients: a multi-cohort study