Apply IP blocks to X-Forwarded-For header

Adds a new configuration variable ($wgApplyIpBlocksToXff), which when
enabled will scan the XFF header for IP addresses and check if any of
them have been blocked. $wgApplyIpBlocksToXff is disabled by default.

Bug: 23343
Change-Id: I3faa9c3e8107c6e46cdf21f8c18adda1f42890d7