broadcast: align `ndims` implementation with intent behind code (#56999)
The `N<:Integer` constraint was nonsensical, given that `(N === Any) ||
(N isa Int)`. N5N3 noticed this back in 2022:
https://github.com/JuliaLang/julia/pull/44061#discussion_r883261337
Follow up on #44061. Also xref #45477.