util: make util.log handle non strings like console.log

util.log will fail on input that does not support .toString(). Have it
use console.log() instead. Includes tests for hairy data types.

Fixes #5349.