allow promoting a numeric type and one of its supertypes. fixes #5085

also fixes #3609 in passing
Merge branch 'master' of github.com:JuliaLang/julia