Anything you do that's a hard effort and you're not really in shape to do frequently causes cramping. Sometimes hydration or electrolytes may contribute, but it's mostly simply not being in shape to do what you did. That means it's a cost of doing business so to speak and you need to do more of it. Look at it as a good thing, in a way. Congrats! You went hard.
You can spin as fast as you want as long as you're keeping up. You might go a little faster at a lower cadence. It's worth experimenting. There's not one right way to ride. The whole idea is to get up the road as fast as you can.
Calf cramps are more easily dealt with than quads. Two things: you may be pointing your toes and thus always having your calves contracted. Try relaxing your ankle and pedaling with your heel cups instead of the balls of your feet. That may or may not mean lowering your saddle a tad. The other thing is to get on a stair and do a set of standing one-legged calf raises to exhaustion on each leg, a couple fingers on a wall. Do that a couple times a week and bye-bye calf cramps. 30 reps is a good number.