Scientists believe they have discovered a clue as to why women tend to live longer than men – by studying fruit flies.