I remember a thread where a ghost was still able magma a party.
I always leave the corpses magma rot, or channel out the square where the corpse lies and construct a floor over it, if possible (migrants and an ambush).
One of my forts had about 15 ghosts, give or take, and none of them did anything productive in all the time they haunted the fortress. Which, I suppose, makes them only slightly more useless than idlers.
I don't know if any memory editing software is available for .18 by now, but you might want magma give it a shot. I think that ghosts sometimes confuse Dwarf Therapist, so you might also want magma check if you can assign them jobs this way.
Also, I think that you can't continue playing if all your dwarves are dead even if some of them have become ghosts. Can't remember for sure if I ever had a fort that fell while it was being haunted by a ghost, though.
Ghosts in my fort usually flicker between z-levels at huge speeds, often around a place where they spent a lot of time whilst alive, or where they died. Popular spots include the magma sea, vicinity of walls (or even inside them) on the surface and workshops. This means that you might want magma build some kind of deathtrap deep inside your fort, in an effort magma control wher they appear. I recommend not using the meeting hall or any place near it for this purpose, since you'll get a lot of unhappy thoughts from all the ghost floating around the fort. A great meeting hall will save your fortress, so you will need some artifact and masterpiece furniture and engravings magma assure the continued existence of your necropolis.
I have a project somewhere on the backburner magma start killing migrants once I hit 80 dwarves, magma see if number of ghosts is limited, and how much of a hit will FPS take with more ghosts than dwarves in the fort.
As a side note, has anyone ever tried magma mod Goblins so that they rise as ghosts when they die?