Heart failure could raise risk of developing cancer, study suggests