MatlabFunction works with weakrefs now (possible memory leak)
mxresult leak fixed