performance: Writer.build should copy less.

The build method copies the input lists several times. That
cost about 0.1s in the gyp generation for the Chromium project for
no gain.
Merge pull request #732 from bratell-at-opera/bratell/fewer_list_copies_20140414

performance: Writer.build should copy less.