Update tests to not trigger undefined behaviour in framebuffer_fetch cases
Some framebuffer_fetch cases had an integer format conversion which
resulted in overflow. The shader and reference texture generation have been
modified to take this in to account when creating values
in such way that it doesn't overflow the max range of the format.
Affects:
dEQP-GLES31.functional.shaders.framebuffer_fetch.framebuffer_format.*
Components: OpenGL
VK-GL-CTS issue: 2016
Change-Id: I686f6548cafee13dd2a0f564bb302d269ca6b0a0