Compiles, linted, partially templated

I'd like to make spherical_3_complex.h a template instead of
essentially repeating it in periodic_3_complex.h