[MATLAB] create objects of proper type (as opposed to SwigRef) in more cases and add type checks

- store MATLAB class name in the clientdata for each type
- use this stored data in SWIG_Matlab_NewPointerObj to let MATLAB create an
object of the correct type
- check type in SWIG_Matlab_ConvertPtrAndOwn. This solves a problem with overloaded
functions. Previously, the first overload was always called, resulting in a crash if the type
was incorrect.

TODO:
- return-type of functions is still SwigRef (current-workaround: pass to a constructor)
- deleting a shared_ptr causes segfault