Having a cup of cocoa or green tea could protect you from the negative effects of fatty comfort foods during times of stress, new research suggests.