Use constant-time conditional copy instead of indexed 2-element array lookup; this should improve resistance to cache-timing attacks; slight performance penality (approximately 5%)
Remove some unused variables; move a misplaced comment
Clip the public key to 255 bits

Rationale:
* it appears to be the new consensus behaviour, as well as being also
adopted in code by Curve25519's author
* backward compatibility should not be broken as I assume all
implementations of the DH algorith already generate public keys with
the top bit cleared
* the top bit can be interpreted in different ways in implementations,
for example as a sign bit, or as a full 256-bit value to be reduced
mod 2^255-19