Since hw.smt was introduced git may use more threads than there are cpus
actually available on the system. Fix this using
sysconf(_SC_NPROCESSORS_ONLN).
Fix memory amount detection in git gc: HW_PHYSMEM64 has been needed for
years to handle hosts with more than 2GB of ram. Leave the HW_PHYSMEM
code path alone for other BSD systems, but fix it so that the detected
amount of memory isn't random stack garbage.
ok sthen@ kn@ (maintainer)