Add support for id bindings
Fairly straightforward, the only tricky issue is that we maniuplate the DOM structure.
Note: this builds on my earlier change to make emitter_test test valid trees.

Review URL: https://chromiumcodereview.appspot.com//13474010