Clean up and new mex for libsvm/liblinear