I'm no scientist, but i would say the foaming is definitely from the mold. In my early days of brewing I'd get lots of foam-overs, I eventually realized i wasn't cleaning the bottles thoroughly - mold would form while they were empty, and when it dries, sometimes a soak and a quick brushing wasn't good enough.
By the way, over-carbonating also used to be a problem until i learned about to-style levels of carbonation and the carbonation tool in beersmith. Dumping in 5 ounces of priming sugar in a 5 gallon batch, which after fermentation could leave you with 4 gallons of beer, will usually be too much...always base your amount of priming sugar on the amount of liquid you'll be bottling, not how big the batch started with or was supposed to be. Sorry if i'm explaining something you know - it was a big revelation for me.