I had similar symptoms and it turned out that the loose stool and mucous were due to lactose (milk) intolerance. A nurse told me that loose stool and mucous are common if your body is intolerant of a food. She told me the most likely suspects were milk or tomatos.
What you might try is removing milk and anything related (watch out, anything having an ingredient of "whey", cheese, nonfat dry milk, cream, etc. is a milk product and contains lactose) for three days. If your symptoms clear up, you have probably have lactose intolerance and you can go to a number of web sites to learn the ins and outs. It is a frustrating problem, but really keeps you from eating too much junk food since most cookies, crackers, and breads have milk products tucked in their ingredients. You can get over the counter pills, "Lactaid", to help, but if you are like me, these will only help a little, so avoidance is the key. (By the way..."whey" is the worst offender to a lactose intolerant person. It is like concentrated milk.)
** Lactose intolerance usually starts to affect its victims in their 30's-40's or after a period where they have not had any milk products. It also has a tendency to get gradually worse as you age.
If it is not milk, try removing tomatos from your diet for three days. I didn't have to try this.
As for your non-digested food, I can't help yet. I have the same problem and haven't figured that one out. I am going to try drinking less fluids during meals and more fluids inbetween meals. Some health sites say drinking too much during meals dilutes your digestive fluids and this prevents your body from breaking down foods effectively. It sounded worth a shot to me.
I really hope this solves part of your problems. I have had your symptoms and was relieved mine was caused by something so simple.