Save MATLAB_class for complex arrays, save complex scalars, and minor refactor

Even after I changed the complex number test to Complex128, it was still failing because we weren't saving `MATLAB_class` and thus couldn't read the complex numbers back out (although MATLAB could). Here's a fix. @timholy, can you tell me if I did something stupid?