!UPSTREAM: WIP: i965/gs: Fix gl_PrimitiveIDIn when using SW primitive restart.

TODO:
- Write the front-end portion.  At the moment nobody is setting brw->prim_restart.sw_prim_counter.