fix race condition in require: if multiple tasks require() the same thing,
one should load it, and the others should wait for that one to finish.
fixes #2805
Merge branch 'master' of github.com:JuliaLang/julia