"memdbg" fixes for a bunch of OpenCL formats. See #739.

The #include "memdbg.h" must basically be the last included header.