Add javascript to determine if the user is from a search engine

Per the monetization service rules we only want to display AdSense to
users that come from a search engine
Changes per code review

*  Externalize js file and use AssetManager to load in script
*  Add back the check in the helper for anonymous users (pages are not cached for
logged in users)
*  Remove `$this->response->addAsset` call in the controller (duplicated now that
the hook is adding the js)
Merge remote-tracking branch 'origin/MonetizationModule' into MON-117
Clean up fromsearch script based on CR

Note, this must be part of the top script that has to run before
the other scripts that check the 'fromsearch' variable. Unfortunately,
this means that we cannot use the jquery's required modules or any
of the cookie modules built-in.

Following the Optimizely extension pattern.
More CR cleanup (formatting)
Merge pull request #4356 from Wikia/MON-117

MON-117 Add rules to display the AdSense Modules