Make C++ - compilable. Mostly remove pointer casting problems. Fix a few places where C++ is stricter than C.
moving trunk for module inkscape