Port PtDebugPrint to C++

This has a couple of benefits:
- We should theoretically no longer run into UnicodeDecodeErrors from the
  plString-based implementation
- By doing things engine side, we can use the logging API to colorize log
  messages.
Merge pull request #349 from Hoikas/debug-print

Port PtDebugPrint to C++