Usually, I've found that soaking a helmet in a bucket of warm water with Dawn detergent, then rinsing thoroughly and drying it takes care of 95 percent of the problem. You might also try diluted Lysol or Pine Sol. The Lysol in particular will kill the smell-making bacteria. The problem is that the smell probably has bonded chemically to the helmet materials, meaning you'll just never get it out.
In any event, sweat-which really is quite acidic, with sodium, potassium, and chloride contained in it-can be as damaging to helmet materials as too much exposure to sun. So while there is no hard and fast rule about how often to buy a new helmet, I'd recommend it every four or five years, maybe more if you really sweat a lot or are out in the sun for hours on end. The good news is that although top-end helmets keeping getting more expensive ($160 for a Giro Pneumo!), mid-range helmets benefit from "trickle-down" technology. Bell's Influx is a great helmet for $75, with 18 vents and a removable visor. Giro's Gila is a great-looking helmet for $70. I also like some of the new Louis Garneau helmets, such as the T-Bone ($90), which looks sort of like your brain is exposed. Cool!
Anyway, my usual habit is to shop specials and buy last year's hot model at $50 off. An example: Nashbar (www.nashbar.com) is selling last year's Giro Boreas-a $150 helmet-for $99.