Replaced implementation in the header files with a separately compiled library

Also generate a megafunction clamppointers_keep_reference when
compiling with run_kernel.sh, that prevents the references to the safe
functions from getting lost.
pocl_kernel: REFER-macros don't refer to the original unsafe function

This is not needed as the original source code will refer to them, or
if it doesn't, it doesn't matter.
Hide some debug ooutput when not -debugging