!UPSTREAM: WIP: vbo: Make vbo_sw_primitive_restart optionally count primitives.

This will be necessary in order to get the i965 back-end to produce
the correct value of gl_PrimitiveIDIn when using primitive restart.
Hook up the front and back ends of the workaround
Move need_primitive_id_workaround to prog_data so it can be seen by brw_draw call
vbo: Implement new gs prim types in vbo_count_tessellated_primitives.