only keep track of struct definitions once
If the underlying type of a typedef is a struct then the definition
of the struct is included in the definition of the typedef in add_type.
Handle typedef types before struct types and mark such underlying
struct types as having been handled when handling the corresponding
typedef type so that struct type is not added to the list of types
separately.
This change should not have any effect now, but in the next commit,
both such a typedef and the corresponding struct type may get added
to the list of types that need to be considered and then pet should
only include the typedef in the list of types.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>