extensions: cache extension querying

When debugging with GLSL-Debugger, the excess glGetStringi calls take
about 10 minutes to complete.

Seems to work here.