I think the terminal corrosion and the stalling are two separate issues, but one may be contributing to the other.
In regard to the battery, if it is not a maintenance free battery, check the water level in each cell. If you have to top it off, only use distilled water. I have heard that low electrolyte will cause accelerated terminal corrosion. Next, clean the terminals again. Then apply an aerosol electrical contact cleaner to the terminals and ring lugs. Make sure that you use a cleaner that incorporates an oil or other compound that prevents corrosion.
As for the alternator (if that truely is the source of the stalling), it sounds like it's crapping out. If the alternator is not putting out enough current to run the ignition coil, the coil will draw current off the battery. When the battery no longer has any voltage, it cannot supply power to the ignition coil. The alternator itself may be letting go, or the rectifier on the alternator may be dieing. The rectifier "cleans up" the power from the alternator and keeps it at a more consistent voltage and current. There is no way to replace the rectifier, just have to do the entire alternator.
My first reccommendation would be to check the "eye" in the top of the battery, if equipped. If you see green, the battery is in good shape. If there is no green, the battery is shot. The next step would be to drive the truck to AutoZone and have them test the current and voltage output of the alternator. They'll know what the operating range is, and they will be able to tell you if you're out of that range.
Keep us posted...
2003 Ford Ranger | FX4 Level II | 5-Speed Manual
A few minor mods... nothing cool enough to mention.