nir/builder: add bitsize conversion helpers