Clean up X-Forwarded-* implementation

1) define statics in header
2) Convert strcmpi to _stricmp
3) Only add X-Forwarded-Proto if it doesn't already exist in the
incoming header (+ add test case for this scenario, too)