MASSIVE refactoring, see long desc of commit

- removing unnecessary manual parsing of json, to use json stringify.
- handling inheritance and typedef aliasing (to classes, wip still)
- exporting all types arguments, return types, member types etc as a
better form of data that can be used as data, rather than a string
which would need to be parsed again on data end.
- properties were missing the public/static fields, added
- added inherit source and state for data purposes
- added a “type” flag for the export too, like type = “class”
- cleaning up parsing of the elements to be common code