Re #8878. Adding CropWorkspace to reduce memory usage.
Re #8878. Adding  checks for data actually in the workspace.
Re #8878. Don't double calculate the background.
Fixed the segmentation fault. Refs #8878.

With the macro for OpenMP removed, GetDetOffsetMultiPeak did not crash
on NOMAD's data but executed successfullly.
Refactored and cleaned codes. Refs #8878.
Made core methods to be static. Refs #8878.
Merge branch 'bugfix/8878_nomad_calibration_crash' into develop