I didn't spot anything that looked like a core function for identifying if a player has a pet, which I'm guessing is why this hasn't really gone anywhere. Might as well just alter the core zone functions, really. Does player have pet? Can pet zone (charmed cannot)? Grab level and current HP, remove the pet along with the player when they leave the zone, and build a new one on the other side. Bonus points for decharming a charmed mob and having it wander back to spawn.
The problem is that it's all in the core, and I can't really do anything to help there
re: getting pets back
Hmm, that'll make the avatar status effect kind of interesting...