Add support for union types to callbacks

This addresses https://github.com/darobin/respec/issues/182