Well, what they told you is partly wrong.
Human teeth weren't perfect by any means. Cavities did occur, and when they did it frequently ended in abscesses and eventual loss of the tooth. What the records do show is that the number of cavities per capita was much less than your typical agrarian society (even the British have fewer cavities than Americans, despite the GP's tired crack).
The basic process of cavity formation is this: two types of bacteria feed on the sticky carbohydrates (corn-based products are particularly sticky), extracting simple sugars (sucrose, glucose, etc) from the deposits. The byproduct of metabolizing these sugars is the release of acid which lowers the pH on the surface of the tooth. When the pH drops below a certain point (5-6 IIRC) the teeth demineralize and a cavity begins.
Pre-farming, a typical human wouldn't be consuming many carbohydrates, so there would be less food for the bacteria to feast on. Consequently, you would likely have fewer cavities. You can find references to a lot of the studies on the correlation between agriculture and cavities in the abstract from this paper: http://www.jstor.org/pss/279500
Early humans did practice basic dental hygiene, though. Simple tools like chewing sticks (miswaks, neems, etc) are very effective at removing plaque when used properly (http://www.ncbi.nlm.nih.gov/pubmed/15643758).