ec/dsa: extract P_OVER_FOUR as a curve specific constant

This actually resolves a possible bug if multiple ecparams were used
(aka different values for P_OVER_FOUR, but only the cached was used).
ecdsa: comment cleanup
ecdsa: use shiftRight and square where possible