Simplify and improve cast tests.

Use memcmp() instead of type punning based result comparison.

Test negative values as well for casts involving FP source operands.
Harden the COMPARE() macro.
More cleanup.