Event analysis issues

Get events in last segment of scan: Previously, detection of events would stop when the deadtime after the last detected event went past the value of sbDetDisplay.Max (the total scan length minus the display width).  Modified the detection code to also detect events
in that segment.

Fix Out of Memory errors in mods to Event Analysis: Previous changes I made in event_analysis_interface caused Out of Memory errors on some protocols.