[rt] Move C debug primitives to separate file.

We want debug-print functionality in all run-times, so move the
stuff specific to C to another file and build that for the C back-end.