nir/algebraic: Add helpers and a rule involving wrapping

The helpers are needed so we can use the syntax `instr(cond)` in the
algebraic rules.  Add simple rule for dropping a pair of mul-div of
the same value when wrapping is guaranteed to not happen.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
10 jobs for !911 with r/spirv-wrap in 8 minutes and 26 seconds (queued for 40 seconds)
detached
Status Name Job ID Coverage
  Containers Build
passed debian #383757

00:00:19

 
  Build+Test
passed meson-clang #383759

00:07:50

passed meson-clover #383763

00:04:38

passed meson-main #383762

00:05:24

passed meson-swr-glvnd #383758

00:05:38

passed meson-vulkan #383764

00:03:07

passed scons-llvm #383766

00:03:12

passed scons-nollvm #383765

00:03:05

passed scons-swr #383760

00:05:33

passed scons-win64 #383761

00:04:53