Add A/B tests for bitcast.

The COMPARE() macro has to be changed so that results are compared
using type punning instead of direct comparison, because comparing NaN
results directly gives a spurious failure.