recur-nn: correct gradients for sqrt and tanh

Sqrt was forgetting that input was already squared.

tanh was just completely confused.