[ValueTracking][NFC] move isKnownInversion to ValueTracking (#95321)

I am using `isKnownInversion` in the following pr 
https://github.com/llvm/llvm-project/pull/94915

it is useful to have the method in a shared class so I can reuse it. I am not sure if `ValueTracking` is the correct place but it looks like most of the methods with the pattern `isKnownX` belong there.
14 jobs for main
in 0 seconds and was queued for 0 seconds