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

whitespace fix
Merge pull request #3166 from IgorStepanov/cppmangleunix2

Different fixes for #3116