You might I am sorry to say consider morgellons disease.... I have it and my stools are exactly the same.... you will notice that one end of the wormy thing is connected to the stool as it is a food source. Scrape your scalp w/ a straight edge and you should find a clearish goo with fibers interspersed in it view under a microscope and you will see tiny black specks triangular shaped. If you find yourself feeling bite like sensations and intense itching at night then I am afraid you are one of thousands that are suffering from this insidious disease that has no known cure to date. Save all the samples you can collect and force your doctor if possible to get them DNA tested....mine won't because they have me diagnosed with delusions of parasitosis. All the symptoms you have explained are what all morgellons sufferers have complained about....look at this web site and compare your symptoms...