User_agent library: robuster detection in is_referral()
Cache result of is_referral()
Merge pull request #2543 from vlakoff/develop-3

User_agent library: robuster detection in is_referral()