Collect type informations for units

Before objects are build, each unit emits a file containing type
informations. This permits better error analysis at compile time.