BUG-1783: fix thread safety issues

A CAS can fail by a racing thread, which may record a lower number, thus
causing the real peak to not be recorded. Also the filed updater has to
be final and the size should be an integer, not a long.

Change-Id: I2069f703a6bdf2bf2c10ff135d0542176a2177fd
Signed-off-by: Robert Varga <rovarga@cisco.com>