Use gcc built-in atomic operations for increment and fetch of
cur_num_filerecs.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>