gl2: split queryExistingState into multiple functions.
all: rename internal/gfxdebug to internal/tag