Set number of build threads and parallel tests to the number of CPU cores

This should work better as a dynamic base, but it might need tweaking for hyperthreading or personal preference.