Convert between affine and jacobian.