move c++ mangle from backend to frontend/glue

fix merging conflicts

fix test