geodesics on a surface of revolution

What you did wrong: the function $f$ should be treated as $f = f(\gamma(t)) = f(u(t),v(t))$. So $\frac{d}{dt}f = \partial_u f \frac{d}{dt}u + \partial_vf\frac{d}{dt}v$ using the chain rule. By the parametrization, you $\partial_uf = 0$, while $\partial_v f$ is what you wrote $f'$ originally. (Whereas in the above you implicitly wrote $\frac{d}{dt}f^2 = 2f f'$, which is wrong.)

This is an instance where you let notation get in your way. If would be clearer if you reserve the $\prime$ for $f'$, the derivative of the function $f$ relative to the parameter $v$ and $g'$ for the derivative of the function $f$ relative to parameter $v$, and use explicitly either $\frac{d}{dt}$ or $\cdot$ to denote time derivatives along the geodesic (as the geodesic equations that you originally copied down does).

For deriving the "conservation of energy", it may help if instead of the second equation in the two geodesic equations (also, I think there may be a sign error in it, but I am not 100% certain), you look at that equation multiplied by $(f'^2 + g'^2)\frac{dv}{dt}$, that is

$$ (f'^2 + g'^2) \dot{v} \ddot{v} + ff'\dot{v}(\dot{u})^2 + (f'f'' + g'g'')(\dot{v})^3 = 0 $$

Incidentally, the second thing about angle against the parallels is called "Clairaut's relation".