The following patches add a new _alpm_for_each_cpu() internal API
function, and use it to spread out the workload of integrity checking
deltas and packages over the available CPUs.
I didn't end up dividing the packages by size, because the logic gets
uglier for what is probably marginal benefit. So each thread gets
roughly the same number of packages to check.
It currently uses sysconf(_SC_NPROCESSORS_ONLN) if available to count
the number of CPUs. Support for detecting the number of CPUs on other
platforms should probably be added by people who can test on other
platforms, but the git and x264 source code are both good examples.