Fix RangeError exceptions when referring to issues or merge requests outside of max database values
When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we get an exception when the Markdown render attempts to run
where(iids: XYZ). Introduce a method that will throw out out-of-bounds values.
Closes #18777 (closed)