tmf: Bug 449206: NullPointerException in HistogramDataModel

- make sure countEvent() isn't interrupted by clear()

- make sure events are not counted after histogram request is cancelled

- fix integer overflow calculating bucket move offset

Change-Id: Ia1bfd4fe88459711301fea07a16aa130fb35f1bc
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/35649
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>