Add more diagnostic output about type definition

Instead of logging referenced types as they are encountered
during the main parsing step, find all type references before
starting said step. This gives us a full list regardless of what
is missing from the current main parsing. Type definitions are
logged as usual, except static mappings are also logged. The
output now also includes a list of undefined types, which contains
the list of types that were referenced in a <type> element, but
never defined either in the parsed girs, or the static mappings.
Sort the diagnostic type lists
Put global namespace types to the front of diagnostic lists

This is to make it easier to see what is expected to come from
outside the girs, and what is not.