Added reference support for incremental processing

With incremental processing it is important to remove references to deleted code. Multiple
angles were investigated and currently we are adding 'real' references to objects in the code.
This means that if the value null is assigned to one of those references that the object is
destroyed rather than that reference being cut.

This allows us to remove the class from the index (and remove it's subreferences) and it will
be removed at all instances where it is used. Even though we do not know how many those are.