Ticket #788 SLIM Plugin grayscale overflow issue

Avoid overflow if photon count is too high.
Tickets #783 & #808 Batch Histogram

Worked on making batch histogram mode usable.