Older people who have never smoked benefit most from smoking bans, a study suggests.