Port of latest Curve25519 stuff from Java build
Optimize Curve25519 point operations