Solar and overcharging NiCd

I'm working on a master project that will help me dominate the world. If anyone can help me, I'll remember that when I rule everything.

I have diodes, resistors, voltage regulators, pretty much a personal radioshack at my disposal. I have solar panels too.

Supplies:
A solar panel with three cells. Each cell has a 1.5 volt output in full sunlight. I can easily wire them in series or parallel if need be.
7.2 v AA 500 mAh Ni-Cd rechargeable battery.

Question:
How do I make the solar panel charge the battery without overcharging it? I know I'll need a diode to prevent backflow, but how do I stop it from overcharging? I experimented with a single AA and with 4.5 volts in direct sunlight, it started leaking after about 30 minutes.

The battery will be used for several functions. Firing a BB rifle, some PIR sensor work, a servo or two. Not all at the same time either, and sparsely. These functions would only happen a few times each day. So how do I go about preventing overcharge? Should I invest in a different battery? More/less solar?

This is for Li-ion so things are bound to be different somewhere along the line, but take a look anyway and see if it's useful.

http://www.rachelselectronics.com/2011/02/solar-piston-v2-2/