Rob Shearman : widl: Add typegen_detect_type and use it.