Handle templates in pytd parser.

Exceptions are now full compound_type.