Fix param order in calloc()
Be more careful about handling cl_ types

Particularly, cl_ulong might not be a (host) long, since cl_ulong
is guaranteed to be 64-bit wide, while on some 32-bit architectures
the long type is only 32-bit wide. So rely on the inttypes.h definitions
and macros on the assumption that cl_ulong is an uint64_t.

While we're at it, use the correct printf format macros for other
types.
Refactor MEM_PARAM parenthetical print

So it can be used for the AMD Free global memory extension
without code duplication.