Add stencil op and other related stuff to make that functionality mostly complete.
Add color/depth write mask support (and rename GPU_SetDepthTest() accordingly).
Add blending color.

Blending color must be set right after stencil op. GPU freezes otherwise.
Create APT event handler thread as soon as possible, and complete initialization automatically when needed. No more 'call aptSetupEventHandler() as late as possible' shit.

Adapt examples to the changes (not tested).