properly C++ const class mangling
explicit is_top_level initialization + additional tests

whitespace fix
fix Issue 12040 - Compiler segfault with circular reference in variable type
fix Issue 12038 - alias this and &this cause ICE
Merge pull request #3178 from 9rnsr/fix12040

Issue 12040 - Compiler segfault with circular reference in variable type
Merge pull request #3166 from IgorStepanov/cppmangleunix2

Different fixes for #3116
Merge pull request #3179 from 9rnsr/fix12038

Issue 12038 - alias this and &this cause ICE
sjklfh