[LibFuzzer] Fix `NumberOfCpuCores()` on Mac OSX.
The nprocs command does not exist under Mac OSX so use
sysctl instead on that platform.
Whilst I'm here
- Use pclose() instead of fclose() which the popen() documentation says should be used.
- Check for errors that were previously unhandled.
move this to where you initialize it.