remove some dead code in stream.jl
improve iobuffer truncate not to store more 0s than necessary
replace memio with IOBuffer
Merge branch 'master' of github.com:JuliaLang/julia