Crop sprayer support is already built in: http://ardupilot.org/copter/docs/sprayer.html
As for the switch you describe, there are lots of problems with your proposed method:
1) Switches typically don't produce PWM. They're digital on/off
2) It's very difficult to have a floating switch give accurate readings on moving tank due to sloshing, unless you have some very sophisticated baffling in the tank. Why not go with multiple moisture sensors around the tank and average the values?
As for the question on how to read a sensor of any sort, an easy way is to treat them like analog sonar modules and just use trigger action based on "distance" (actually whatever you're really measuring)
Hi Paul. Chris definitely has the right idea. A float would be unnecessarily heavy and complex - especially if you simply want to know when the tank is empty. Back in the day I designed a meniscus sensor for an automated pipettor that was essentially two stainless steel wires, a 10-turn potentiometer, a couple of resistors and a small darlington transistor. Dirt simple, adjustable for the conductivity of the liquid, highly reliable, lightweight and you can get a PWM output by feeding the circuit to something like an Arduino Trinket. You could also compensate for sloshing via soft hysteresis - tell the Arduino not to provide an output to your FC unless the tank appears empty for a solid 1 or 2 seconds.