gs: Check GL errors in primitive-id-restart test.

Previously, if drawing failed due to a GL error, no primitives would
be generated, so the test would have nothing to check, and it would
erroneously pass.  Avoid that by checking for GL errors at the end of
the test.