WIP on type parsing (almost done)

This commit introduces the much-awaited type parsing capability of the library.
It seems that almost all of the types are working, with the exception of the
function kind. The code also contains various debugging printfs, either pure
memory hexdumps or variable printing - this will be removed in the near future.
There are some assumptions made, for now, e.g. about the parent uniquification
not taking place or so.