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

Prevent logging to stdout/stderr, make sure we log to error.log for
early messages during initialization.

Fixes https://github.com/pagespeed/ngx_pagespeed/issues/808