dart2js: restructure emitter.

Collect information before hand, and then emit output units in one go.
First emit the deferred units since we need their hashes in the main unit.

There is still code that collects the output-unit of the emitted element, even though we know that it should/must be in the current output-unit. That code can be cleaned up in a later CL. We should not need to look up the output unit for any element in the old-emitter anymore.

R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@41142 260f80e4-7a28-3924-810f-c04153c831b5
dart2js: Use computed classes/statics from code-emitter-task in new emitter.

R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@41143 260f80e4-7a28-3924-810f-c04153c831b5