Make pycuba compatible with cuba 3.1 - 3.3

Cuba releases 3.1 and 3.3 contain interface changes. Due to these pycuba segfaults when a more recent cuba version than 3.0 is installed.

This change fixes these issues while providing backwards compatibility (as long as the cuba version can be extracted from the real file name of the library after resolving all symbolic links, e.g. libcuba.so.3.0).

I'm not sure whether you want to keep all the compatibility code, but at least it helps everyone who needs to figure out all the argument sequences needed by the different cuba versions.