Refactoring in Spectrogram and SpectrogramView

Move some logic from SpectrogramView to Spectrogram. This is preparation to
move the lazy logic into a superclass that can be used by other
visualizations.