fix some C++ compiler warnings about char* constants
remove dead Py2.7+ code in <Py2.6 only code blocks and clean them up a bit