Remove base.* methods.

-Replace some methods with sugarjs equivalents (e.g. endsWith and unique).
-For methods that are only used in one place, move them to the module
they're used in. These and almost all the code left in the scripts
directory will all go away with https://codereview.chromium.org/402603007.

NOTRY=true

Review URL: https://codereview.chromium.org/400423002

git-svn-id: svn://svn.chromium.org/blink/trunk@178528 bbb929c8-8fbe-4397-9dbb-9b2b20218538