Fix some compiler warnings and a bug in C++ wrapper.
Merge branch 'flint-2.4' into trunk