[MATLAB] fix issue with classes derived from multiple base classes

fix SWIG_Matlab_ConvertPtrAndOwn to call the appropriate conversion function
via SWIG_TypeCast. In the previous version, the conversion always assumed that
a simple reinterpret_cast would do the trick, but that is no longer true if you
have multiple base classes.