[C] Remove mintomic and use gcc atomic builtins.