Write tracebacks to stderr instead of stdout.

Use -d:useStdoutForStackTraces to inhibit this change. This also breaks
error reporing in CGI, but it wasn't done securely - this will be fixed
separately.