Fix to call cleanup code in exception situations and not to invoke the freearg typemap twice in certain situations. Fixes https://sourceforge.net/p/swig/bugs/1211/