Unified2xff v4

New version for the X-Forwarded-For support in Unified2 alerting. Note that I have decided to create a different pull request as there were a lot of changes that need to be applied to bring this patch up to date with the current master.