Add IP, PORT and REFERER to log output options
Update Logger to handle empty referer field

Currently a warning is written to the web server log if the logger tries
to access the HTTP_REFERER index on $_SERVER and it's not present (e.g.
when a user refreshes or comes to the page from a bookmark).  This fix
checks first to make sure the referer is set.
Merge pull request #168 from 8w/8w-add-logger-tokens

Add IP, PORT and REFERER to log output options