There is a strong link between the time of day that people drink coffee and their longevity, according to one study.