Sanitize dots in metric names too.
Flush StreamLogger periodically.

fixes #4890