inference: refine branched `Conditional` types (#55216)
Separated from JuliaLang/julia#40880.
This subtle adjustment allows for more accurate type inference in the
following kind of cases:
```julia
function condition_object_update2(x)
cond = x isa Int
if cond # `cond` is known to be `Const(true)` within this branch
return !cond ? nothing : x # ::Int
else
return cond ? nothing : 1 # ::Int
end
end
@test Base.infer_return_type(condition_object_update2, (Any,)) == Int
```
Also cleans up typelattice.jl a bit.