I can't take credit for the idea of a pet caste, I think someone on the forums had suggested it to me. (I forget who unfortunately)
Sorry if this is too basic, I would make sure to try that with an INTELLIGENT creature. INTELLIGENT is the combination of CAN_LEARN and CAN_SPEAK, the two of which I think are a prerequisite for certain DF functions. I think not having the INTELLIGENT tag (or specifically CAN_SPEAK) is what prevents a troll from working in the fortress, although I suspect having it would also prevent them from being troll-like, appearing in sieges and so forth.
I think that you can give tags as part of a syndrome though, so you could make them touch something or drink something that makes them INTELLIGENT.
As for showing up in World Gen, I was thinking maybe you could make the transformation caste have the name as the thing they are going to turn into. So in this case, call the 4 castes, dwarf male, dwarf female, mushrooman, mushroomaid. Then mushrooman and mushroomaid have the syndrome that turns themselves into a different creature that also has the caste names mushrooman and mushroomaid. You could even give the mushrooman castes the same bodies as the other creature, different size, chitin instead of flesh, etc, for whatever calculations happen behind the scenes.
(I found out quite by accident that caste name completely overrides the creature name. The first time I tried to write Vulps in Furry Fortress, I gave males and females the caste-names "renard" and "vixen". When I tried to search for "vulp" in arena mode, there was nothing, but plain old "renard" and "vixen" did show up. So in the end I had to call the castes "vulp renard" and "vulp vixen". )