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.