Partial g4 rollback of changelist 128728178.
Partial g4 rollback of changelist 128728178.

*** Reason for rollback ***

breaks strings containing \n

*** Original change description ***

Improve goog.userAgent dead-code removal.

There are 3 basic problems:
 * goog.string.trim isn't know to be side-effect free
 * goog.string.compareVersions isn't know to be side-effect free
 * goog.userAgent.isVersionOrHigher caches its results

goog.string.trim has two problems: (1) the function definition is abstract and isn't considered "known" (2) String's "replace" isn't naturally side-effect free (it can take a function) and the special casing only applies when there is a string literal

g...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128752293

codyebberson/closure-library,platinumpixs/google-closure-library,google/closure-library,google/closure-library,joeltine/closure-library,lucidsoftware/closure-library,ChadKillingsworth/closure-library,teppeis/closure-library,ikabirov/closure-library,redforks/closure-library,redforks/closure-library,ChadKillingsworth/closure-library,ikabirov/closure-library,teppeis/closure-library,Medium/closure-library,platinumpixs/google-closure-library,lucidsoftware/closure-library,ChadKillingsworth/closure-library,Medium/closure-library,platinumpixs/google-closure-library,joeltine/closure-library,joeltine/closure-library,codyebberson/closure-library,lucidsoftware/closure-library,google/closure-library,codyebberson/closure-library,teppeis/closure-library,redforks/closure-library,codyebberson/closure-library,ikabirov/closure-library,ChadKillingsworth/closure-library,Medium/closure-library,teppeis/closure-library,ikabirov/closure-library,joeltine/closure-library,google/closure-library,google/closure-library,platinumpixs/google-closure-library,lucidsoftware/closure-library,redforks/closure-library,Medium/closure-library