Move multilayer loading logic into its own function.

Refs #9970
Remove orphan: ApplicationWindow::openSpectrogram.

Refs #9970