[xla:gpu] dot_merger: reorder merge checks to call IsReachableNonConst last
[xla:gpu] dot_merger: reorder merge checks to call IsReachableNonConst last

Only perform the reachability check if necessary, since it can be expensive.

This brings a 1.5x compilation time speedup for a large, dense model.
