The move from eating mostly meat to refined carbohydrates and grains meant tooth-decaying bacteria could thrive, finds a new study.