Move mask code into dedicated module

spectral_cube.py is getting pretty gnarly as a single file