Text variant of traceEvent.
O(n) This function marshals the Text into a ByteString and
convert it into a null-terminated Foreign.C.Types.CString.
Note that this function doesn't evaluate the Text if user tracing in eventlog is disabled.
The input should be shorter than 2^{16} bytes. Otherwise the RTS
generates a broken eventlog.