Add casts to python support for -Wc++-compat
HACK externify static variables in python support for -Wc++-compat

This would probably be better done by moving the definitiion up,
which we might be able to get away with in gdb's code, since it *is*
legal to forward-declare a static *function*.

In general, it might not work, if there are two statics trying to take
each other's addresses ...

That said, it's pretty suspicious to be defining a static variable more
than once in a TU even in C.