Get the rid of (some) warnings.

Also: slightly more flexible debug buffer management.
Some moar OpenCL cleanup

Debug buffer management supposed to be in previous commit