Handle enums as template arguments in the clang frontend

This currently involves a significant hack: canon_template_arg
silently ignores any exceptions generated by the type system
canon call.  To make this unnecessary, the type system would
likely have to know more about enums.

For the same reason, the gccxml frontend is now broken.

libclang synced from https://github.com/xdress/clang/commit/9e77c125626db4b1504edffa055e0b4dbbc89715.