Evolving Pokemon based on CP vs Moves
You shouldn't care too much about moves unless it is the final evolution. Since you're not guaranteed to get any move from a previous evolution you should evolve solely based off of CP. In addition CP plays a larger role on battles unless the CP difference is less than 100 to 200. I've won several gym battles against a type my pokemon was weak to simply because my CP was higher.
Honestly, it's a bit of both. Generally speaking (at least in my experience), if you have a high CP pokemon with a good special move, it'll evolve and still have a good special move (if not perhaps the same one).
Take a couple of examples of mistakes I've made: I had a relatively high level slowpoke but it had water pulse as a secondary. I evolved it hoping it would change and... it didn't. And it does about as much damage as my water gun primary attack. My Seel ---> Dewgong was even worse; it learned Icy Wind, which is probably up there with the worst moves in the game.
On the flip side, evolving one of a significantly lower level just because it might get a better move can make it pretty expensive (in stardust) to level up to a reasonable CP. Sometimes there's just no point, you may as well wait for a better one to evolve. I'd rather sit and wait for a high CP pokemon with a good secondary than rush and regret it.