logging: delay factory init so we log to error.log

Prevent logging to stdout/stderr

Fixes https://github.com/pagespeed/ngx_pagespeed/issues/808