I think your electronic ignition is constantly passing current through the ignition coil, which is why it gets hot. It is like a conventional breaker points system, where the points constantly make contact with each other, and do not open when they should to make a spark. Normally they're open for about half the cycle, so that the coil gets charged only for half the time, and I guess with an electronic ignition it should be similar.
To answer your question, I think the following happened: apparently corrosion has got the better of your ignition, and it continues to make that contact. When you switched the ignition off, that contact caused a current fluctuation, apparently enough to cause a high voltage in the ignition coil. That in turn caused a spark in the plug, thus igniting the fuel that remained in the barrel. Apparently the piston was in a lower position (or pushed there because of the explosion), and after passing through the exhaust port, the hot gasses caused the oily fuel mix in the exhaust to also ignite.
Please do the test Blurredman suggests, and you can see the spark for yourself, occurring when switching the ignition on/off (& v/v). You're then using the ignition switch as breaker points.
It should not be difficult to get the old stuff off, but I don't know your system & without pics it will be difficult to advise. Uploading pics should not be difficult either.
For instance, if you select the 'Upload attachment' tab right below where you are typing a reply to this post, and press the 'Browse' button, select the pic you want to upload. Then select 'Add the file'.

- how to upload a pic.jpg (7.94 KiB) Viewed 1900 times
You can then select 'Place inline', or not.