Automatically set maximum number of histogram bins by grey value range if advanced settings are enabled.
Merge branch 'bug-18044-MaximumBinNumberByValueRange'