For long shelf life you are looking at Lithium Primary. In the AA format you can expect the following shelf life:
Zinc Chloride (heavy Duty Carbon Zinc): 2 to 4 years
Alkaline manganese: They are now claiming 10, it wasn't that long ago it was only 5.
Lithium: 20 years (it wasn't that long ago it was only 10).
Of these, let's compare costs:
Zinc Chloride: Cheaper than dirt.
Alkaline: Cheap as dirt
Lithium: A bit Pricey
Let's compare Cell weight:
Zinc Chloride: Very light, i use these in a flashlight where the lighter weight is more important than having 24 hours of runtime (this is an INCANDESCENT light by the way, but D cell).
Alkaline: A bit heavy, but not too silly unless you use then in a very light weight device.
Lithium: Very Light weight not much more than Zinc Chloride.
Leakage:
Zinc Chloride: Zinc Chloride leakage is uncommon, but still possible if cared for correctly. However, just like Alkaline they can leak at a seemingly random interval. Zinc Chloride Leakage is almost always destructive unless caught and cleaned within a few minutes of leaking.
Alkaline: Alkaline leakage is uncommon, but still possible if cared for correctly. Alkaline leakage can range from being an inconvenience (cleaning terminals and wiping up any liquid) to total destruction (contact with circuit boards or in an aluminum flashlight).
Lithium: Not much is known other than Energizer stating that under normal consumer use it shouldn't be possible.
Performance:
Zinc Chloride: Poor to Garbage: Intermittent light loads such as flashlights, radios (excluding transmitters or those with digital displays), clocks, and remote controls are ideal. Transmitters are okay if transmitter use is intermittent such as a walkie talkie. Avoid devices (other than clocks) with motors. Digital cameras must be avoided. I actually tested that, the cells lasted two shots.
Alkaline: Good to Poor: Great for most battery loads. Excellent performance in Carbon Zinc Applications (when running a portable radio with analog tuning you may be wondering when the battery will finally die). Good performance in Walkie Talkies as long as use is intermittent or transmitter power is low (anything above about 2 watts can cause cell heating during long conversations). Poor performance in heavy drain devices such as digital cameras, photoflash, 5 watt Walkie talkies, pocket televisions.
Lithium: Picks up the ball where Alkaline drops it. Heavy loads that see poor performance on Alkaline cells will see a performance boost, low drain devices will not have a performance improvement. Extra care is required in flashlights, especially of the incandescent variety as the nominal voltage is 1.7. Remember with Lithium the cut off voltage (dead battery point) is 1.5 volts under load, not 0.9 volts.