Added %FlattenString and use it to speed up a regression test.

Flattening strings is relatively costly and by doing it after every duplication
we avoid combinatorial explosion.

Note that flattening could have been done by e.g. using a regular expression,
too, but this is just another implementation detail and %FlattenString seems
general enough to be useful in other tests, too.

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@13337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
MIPS: Fix typo in commit r13326 (f8c9bf84).

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11824015
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@13338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00