nir: Add 16-bit idiv lowering
First few commits are adding missing helpers and cleanups to express this concisely as discussed with @jekstrand and the last commit adds the new lowering path. We could probably do better for rem/mod but this seems to work.
16-bit paths pass the relevant dEQP-GLES3 tests on Bifrost with CAP_INT16 enabled. I am not able to test 8-bit right now since I don't have clover setup for panfrost / Vulkan / etc.
An algebraic pass could also be used (and was written first) but Jason recommended we keep the idiv lowering in one place. The alternative is to rename the pass to lower_idiv32, with algebraic passes with 8/16 controlled by shader compiler options. Note int64 division is handled elsewhere as it is.