Re #6191. Spotted an (absence of) initialisation problem.
Re #6191. Remove erroneously copied comment.
Re #6191. Pass through to buildNearestNeighbours method.

It does the same thing, but includes more error checking.
Re #6191. Add a new, much thinner class for data-detector mapping.

Usually, this information will be held in a workspace's collection of
ISpectrum objects and the existing (I)SpectraDetectorMap class will be
going away. However, there is occasionally a need to hold the mapping
separately from data. Examples are for the NearestNeighbours stuff and
if you need mapping for data that is not in a workspace (e.g. not yet
loaded in or workspace doesn't hold all spectra). This class will be
used in these circumstances but will be transient, not persistent (i.e.
the workspace will not have it as a member).
Re #6191. Use new SpectrumDetectorMapping in NearestNeighbours code.

I realise that there is a reduction in abstraction here as I haven't
replaced the ISpectraDetectorMap interface. It didn't seem sensible having
to reimplement the map iterators when this is the only place it is used.
What I have done is aliased the unordered_map that's passed in to
ISpectrumDetectorMapping.
The alternative I considered was placing SpectrumDetectorMapping in
Geometry, but I wanted the class to be immutable and that meant taking
in a MatrixWorkspace in the constructor.
Re #6191. Remove unnecessary includes.

I'll be making other changes to this header so it won't be a huge rebuild
in vain!
Also moved a method declaration to be with the other similar methods.