Finalizes thing if necessary. Thing can be a class, object or symbol naming a class. Returns the class of thing.