Sticking to official dietary advice, including the five-a-day maxim, could reduce the chance of premature death by an estimated 7% as well as help the environment, a study has suggested.