I haven't had a chance to do this yet, but in my head it seems like a fairly easy way to deal with the demons.
First, dig down to the magma sea, and make a long 1-tile-wide snaky corridor on the same level as the magma. Now build an exact replica of the tunnel one z-level above it, and fill this about 3/7 high with water.
Now breach hell, and have your miner turn around and RUN as fast as possible down the lower of the two snaky corridors. All the demons will follow. If you did it right, the entire demon horde will be walking up and down the snaky corridor at once. At this point, seal off the entrancs and exits to this snaky corridor (not sure if bridges work, use constructed walls if you have to). So now you have all the demons locked away in an area that ISN'T hell. As far as I'm aware, new demons only spawn after a certain number of the original wave are killed. In theory, this means you can now go down to hell and wall off the sides, or build a little bunker, or do whatever you want to do, free from trouble. Then, when you're done with hell, you can fill the snaky corridor with magma, and then send your miner down te corridor filled with 3/7 water to channel out the floor below him. Doing this the whole way along will turn the entire demon corridor into obsidian, killing them all. If you took the time to wall off hell, then no more demons will spawn, and voila!
Next is something I actually did do, which is release the demons during a goblin siege. There were perhaps 70 goblins and 15 trolls at the time. Surprisingly, the goblins did really well, and killed all but 4 of the demons. I can imagine if you have a load of goblins caged, you could make a tactical-release system which uncages just enough goblins to finish the demons, without leaving behind too many goblins for you to mop up at the end.