Add check functions for optimized DCT implementations.

Checks are enabled by defining OD_CHECKASM.