Refs #10224. Fixed the bug caused by array boundary.

On branch feature/10224_findpeaks_bug

      modified:   ../Mantid/Framework/Algorithms/src/FindPeaks.cpp
Fixed the bug for extreme case. Refs #10224.
Refs #10224. Considered the extreme case.

On branch bugfix/10224_findpeaks_bug
  (use "git reset HEAD <file>..." to unstage)

      modified:   ../Mantid/Framework/Algorithms/src/FitPeak.cpp
Merge remote-tracking branch 'origin/bugfix/10224_findpeaks_bug'