Fix #4503
Address all issues discussed in #4547
Add test for spdiagm and update docs
Merge branch 'master' of github.com:JuliaLang/julia