GRAPHICS: Also add a stencil attachment to framebuffers

This patch enables stencil operations when running in a framebuffer.
It prevents shadows in grim from rendering outside designated shadow areas.

Note that this does require the GL_OES_packed_depth_stencil extension on
ES2. iOS supports it, and so do modern Android devices.

If necessary we could add a separate path that uses regular textures for stencils.
Thoughts on how to handle extensions?