An active sex life improves survival chances for people who have had a heart attack, according to a group of researchers.