Add typedef support for union types

This allows:
typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;
in Document.idl.

Content of change is just
"re-assign idl_type, instead of just mutating, since type(idl_type) may change"

Encapsulation provided by IdlType makes this *very* easy.

Also:
* adds a test case
* adds real use
* fixes formatting in TestTypedefs.idl

R=haraken
BUG=348161

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168996 bbb929c8-8fbe-4397-9dbb-9b2b20218538