If it was long stringy poo it can be a bacteria infection or internal parasites, mucus on skin can be a parasite or bacteria infection, is the fish flicking and rubbing itself, also if they have attached to the gill heavy breathing.
he's re gained his color from earlier..he was really brown looking when i first founf him.....and then the whitish bluish stuff came along and he started acting strange, but he just helplessy floating and then he goes mad...for a few seconds
My vote goes on old age. A Betta's life span is 18 months I believe, and 6 months before they are even sold or there abouts in a LFS. Even if there are other complications ie the other probs people are suggesting, I believe make him as comfy as possible. Take comfort in the fact you've given him as good a life as he'd get under best circumstances, you'll miss him terribly, but if you make his last hours as least stressful for him as possible and if you can spend them with him. It will help.
Cheers Xan. It's a sad day when you lose a friend, make him happy.