fix #2477, scheduler integration of the various wait_* functions

Conflicts:
	base/stream.jl
Merge branch 'release-0.1' of github.com:JuliaLang/julia into release-0.1
Merge branch 'release-0.1' of github.com:JuliaLang/julia into release-0.1