OOP: improvements for classof and class casting part 2

Merged Miklos Magyari requested to merge cccof2 into master

Signed-off-by: Miklos Magyari miklos.magyari@sigmatechnology.se

Merge request reports