BUG: fix handling of infs in hypot on windows

On any platform where we used our own implementation of hypot, (e.g.
windows) there were several issues with infs.

hypot(inf, y) == inf, for all y including nan.  We now check for inf and
handle this case explicitly for all y instead of just y = nan.

Although hypot(inf, 0) was correctly returning inf, it was incorrectly
raising the invalid floating point exception.

Fixes gh-2385
Merge pull request #4002 from juliantaylor/hypot-1.7.x

Backport PR #3992 to 1.7