I think this is normal and projectile vomiting, coughing,sweating and other forms of elimination are just a normal part of your body trying to eliminate contaminants and regulate its own cycles.
Regarding what you may have spit out, it could have been as simple as old tissue or a walled off infection from long ago that the body was able to loosen and then help you emit from the upper passages of your body. It could also have been a particle that had been inhaled that may have been walled off as well ( have you ever attended a bonfire and inhaled soot etc or been in a really dusty environment - same concept).
I had a similar experience, did a 28 and 32 day Water Fast
and on the first fast cough out some blood and big meaty blood clots. Don't know why but felt much better after it was out.
Better out than in as they say.
Good luck on your fast.