build_all.sh update (#13320)
build_all.sh update (#13320)

* Don't overload the system, don't crash when you can't determine the CPU count and don't rely on bash

* Extract to variable

* Limit number of spawned jobs for systems with weak IO

* Use proper arithmetic braces

dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim