Minor change to fix DB settings in tests
Check X-Forwarded-For header for ignore IPs

Enhances analytics ignore IP check by checking if the X-Forwarded-For
header is set.  If set, the first IP in the chain is the original
client IP.  This allows requests to be differentiated between actual
requests from a load balancer vs requests going through a balancer.