ir: Add build functions
ir: Remove TypeReference helper constructor
ir: Make TypeReference hold a QualifiedName