remove occurences of mexErrMsgTxt() in all MEX files
This function throws a C++ exception, which is not handled correctly by MinGW for 64-bit (at the current time).
It appears that the benefits of using MinGW on Windows 64 are greater than the inconvenience of not using that function.
In case of error, MEX files should print a meaningful message with mexPrintf(), and then return control to MATLAB (with return()). A new output argument of the MEX file should be dedicated to informing MATLAB of the error condition (the output argument can be 0 in case of success, 1 in case of error). The MATLAB code should check that argument, and in case of failure should run "error('MEX failed')" to interrupt the execution of the code.
Note that it is still possible to use C++ exceptions inside the MEX function (as is currently done in k_order_perturbation), so that all error conditions can be catched by the top-level mexFunction().