convert url to unicode before logging to avoid unicodedecode errors.

adds a utils directory with the same unicode_helpers file that is in core.
this wasn't an urgent fix, but figuring out how to avoid throwing the unicodedecode exceptions helps me understand our unicode situation better for when it is time to do the unicode refactor.
add more logging to figure out analytics flushing exception