Anytime the words "head gasket" get mentioned, I get concerned about the engine..that's all. I really hope you get your Jeep fixed, though...I'm a fan of all Jeeps, but a have a special interest for the older ones.
This link shows most of the sensors and there locations, the 87 doesn't hve the ballast resistor shown, it was first introduced in the 88 models, though some 87's were retrofitted.
If you are getting spark it is doubtful to be the CPS, unless it is acting up intermittently. Jeep Cherokee Engines - RENIX (non-HO) Engine Sensor Diagnostics
thats probably the problem. well i will check that the next chance i get. in the mean time, i now know how to change a freggin timing chain:x. and have a harmonic balancer fall on my head. i need to view this a learning experience.
anyother ideas that anyone else has please keep postin them. i dont want this bad boy to die yet