check for overflow in computing array sizes. fixes #1936
Merge branch 'master' of github.com:JuliaLang/julia