Cleanup: Extract log utils into pkg/log

Carry of #7222 -- all tests pass, squashed and rebased against master.

/cc @vieux @capoferro
I think this package should be based on stdlib `log.Logger`.