Add --template option to gen.py
Add callback to QueuingEmbed.postMessage

And remove delegate stuff.
Rename QueuingEmbed -> Embed, Embed -> NaClEmbed
Add Module.$commit and tests

* Also removed nmf/mimetype from NaClEmbedForTesting.
* Module constructor now takes an Embed.
* Module message now has setHandles/getHandles fields.
Add $commit test that message is cleared.

Also, run fake events on nextTick to better emulate a real embed
element.
Reset context in module's $commit() callback

It's convenient for the user to not have to manage their contexts
explicitly. So we assume that they want to use the same context in the
$commit callback as when $commit was called.
Add module.$destroyHandles and tests
Add helper function module.$commitDestroy
Add Handle.setFinalizer and tests
Add test for Handle.cast, and fix bug
Add module.$errorIf and tests

The purpose of $errorIf is to stop running commands if the passed value
is true. It's meant to be used with other built-ins:

  h = m.fopen("filename", "r");
  m.$errorIf(m.eq(h, null));
  // Now we know that h is non-null...
Fix gen.py when generating anonymous structs/enums

We have to do an explicit check to see if the declaration spelling has
no text to determine if a union/struct/enum is anonymous. The type's
spelling will say something like: "<anonymous enum at some/file:14>".

This allows us to run gen.py on libgit2's git2.h
Fix equality testing for types in gen.py

Equality testing as exposed by clang's python bindings doesn't work
correctly for our purposes. Sometimes types are not equal, even though
they should be.

I've modified Type.__eq__ to do specific checks based on the TypeKind,
often just doing a check that the spellings match.

This fixes a bug where some anonymous structs/enums were being listed
twice (e.g. git_branch_t in the libgit2 headers).
Fix bestViable for variadic functions