Defines an equivalence relation on the `Value` type to standardize several places in the code where we replicate the ~same equivalence comparison. Differential Revision: https://reviews.llvm.org/D135964