Support LOG_TO_STDOUT

It seems it is tricky to get mysqld_safe to output things to stdout/stderr.

We first have to get logs to go to stdout/stderr, then we can support both JSON, LOG_TO_STDOUT, and log rotation.

Edited by Mitar