Move syscall.Stats logic to os specific file.

related to #2909.
Merge pull request #2927 from andrewsmedina/stat_macos

Move syscall.Stats logic to os specific file.