C-Diff
You should get your stool checked out for C-Diff = C - difficile is a bacteria in your intestines. It is found normally in healthy and ill people alike. There are millions, perhaps billions of different types of bacteria in your body. Bacteria are an important part of your health. They help break down and digest food. They also ward off many "bad" or foreign bacteria that you may come in contact with. In fact, the "good" or normal bacteria on your hands can kill certain bad bacteria which you may pick up handling food or touching everyday items and fixtures.
I had the same problem and after 3 yrs of living with this they finally found it. I am 100% cured from the antibiotics but I have to say I had my stool checked out 3 yrs ago and they found nothing you might want to do a few of them.
When you have bowel movement is the stomach pain relieved? If so, this could simply be a case of IBS. Mucus in the stool is a common symptom of IBS. I would get checked out again just to be sure but sounds like that could be the problem... Remember though, I'm not a doctor - but I have read up on IBS because I'm having several gastro issues myself and think I may have IBS.