Intern provided ast.
If there are no objects, which are equal to ast according to KInternedObject.internEquals save and return the provided ast. Otherwise, return the previously exising object.