Simplest interim suggestion I can think of: make tasks ignore objects which are on fire. That could probably be snuck in within a few minutes of programming time. Dwarves that are on fire should just run around screaming (i.e., each step is chosen in a random direction) until they expire. Other dwarves can remain oblivious to those other dwarves for the interim, since a dwarf who is running around screaming won't be adjacent to a passerby long enough for the passerby to ignite (and in the rare cases where they are, it'd be more funny than bugworthy).
I propose the following tweaks:
One, a dwarf who catches on fire or who has any equipment on fire will immediately drop their current task and choose the "Jump In Water" task (per the OP). They'll find the nearest body of water sufficient for total immersion and will dive in. If there is no such body of water, the dwarf won't get the task and will simply run around unless the following task manages to douse him.
Two, any object that catches on fire will add the highest-priority task "Douse Object" to the queue, with the job object chosen as the nearest fire bucket to the fire. A dwarf will then fetch the fire bucket and attempt to douse that object (a dwarf should abandon their duty to douse a fire only if there are no soldiers, unemployed dwarves, or fortress guards free). Fire buckets are a new uilding item: to construct a fire bucket "building", the dwarf needs a bucket; instead of leaving the bucket at the building site, however, the dwarf fills that bucket, then hauls it to the fire bucket site with Furniture Hauling and "installs" it there. After this, the implementation gets a little more hazy: when a dwarf grabs a fire bucket and douses a fire, should the dwarf refill the same bucket, or should the dwarf see if there are filled water buckets and just drop the empty bucket? A dwarf could wind up going to refill a bucket from the outside river when there is already a full bucket nearby, or wind up going to grab a filled bucket across the fortress when there is a water source nearby; it would take some significant code work on the back end to allow "smart" tasks to choose between two possibilities. An interim solution would probably be best if the dwarf opted to grab a filled bucket and drop the empty bucket, since players would probably cluster fire buckets around important areas.Three, when a fire bucket has served its purpose and the fires are out, the dwarf simply drops the bucket. Then the task "Refill Fire Bucket" takes over, where a dwarf with Furniture Hauling is given the task to retrieve the bucket, fill it, and put it back into the fire bucket building.
If no water is available, a fire bucket could be filled with sand or gravel instead of water.