only add logFn function to before if logFn exists
only add logFn function to before if logFn exists

This is a new implementation of #387, but fixed.

Previously, we added a function which would use logFn if it exists.
Since this is all this function does, if logFn does not exist, we don't
need to add the function at all.

This should, in theory, provide a small performance boost as well, since
the operation of checking for logFn doesn't need to be performed on
every request log.

indexzero/http-server,indexzero/http-server