Move stack trace output to PrologControl

This allows applications to decide where stack traces should be sent,
if they are enabled in the current execution.
3 files changed