console.error instead of console.log to avoid corrupting condense JSON output

I noticed some invalid condense JSON output due to the use of `console.log` in debug mode. The log messages were becoming part of the JSON output. This PR makes tern log to stderr, not stdout, so that condense JSON output (or the output of other tools using tern as a library) is never corrupted by internal errors.