limit # threads to MAX_THREADS
Merge branch 'kpamnany-multithreading' of github.com:JuliaLang/julia into kpamnany-multithreading