CP, IV's that cover weaknesses better (HP for Alakazam, for example) and most importantly movesets. After that, it's just a matter of use. I've been hanging on to way too many of my prime prestigers because I wasn't sure if this new gym system was gonna stick. It is, so the cull is beginning.
I might even drop an egg and evolve a lot of middling 50-candy pokemon I got from hatches, the reassess what's best just for the sake of space. Already assigning my army of soloed lower IV's Machamps to gyms and transferring upon their return. It's sad, but I can't hold on to everything.