intel: move ubo ranges gfx ver check into separate function.
iris never deals with gfx7, anv already has a check in its code, for crocus I want to have more control over this, so just create an API for i965 to use.
Also all brw users memset prog_data earlier so it should be fine to avoid the memset here.