Split test_instances lib up into even smaller blocks. Fix a few gcc-mingw test failures. Fix typo in spherical harmonic docs.