Dynamically set the number of jobs when compiling

Calculate the optimal number of jobs instead of hard-coding -j4 to the make commands. This drastically speeds up compilation time on machines with 4+ cores.

The number of jobs is calculated as number-of-threads * 1.5 since running only one job per thread tends to not maximize CPU usage completely.