Refs #8279 - Fix crash and undesired behaviour.

Ultimately, the problems were caused as a result of code I wrote nearly
two years ago.  It was some of the first C++ and Mantid code I ever did,
and it really does show.  Overengineered in places and underengineered in
others, redundant code, useless abstractions, and poor use of common
idioms.  Just awful.

I'd love a chance to go back and redo it, and probably make it a third of
the size in the process.

In the meantime, I've made the following changes:

* Correctly filtered the workspaces that have been selected by the user to
exclude non-MatrixWorkspaces.  This means including the children of
WorkspaceGroups and excluding WorkspaceGroups themselves.

* Correctly find the common spectra IDs between selected workspaces.

* Only offer the user the chance to select spectra IDs to plot if there are
indeed common IDs between all selected workspaces.  Otherwise just allow
selection of common workspace indices.

* If workspaces only share a single common workspace index (and don't
share any common spectra IDs), or if all workspaces only have a single
spectrum, then just go ahead and plot them.  No need to ask the user at
this point.
Merge branch 'bugfix/8279_fix_plot_spectra_for_groups_and_multiple_workspace' into develop