tgsi: Refactor tgsi_dump to avoid using string buffers when dumping.
tgsi: Refactor tgsi_dump to avoid using string buffers when dumping.

This fixes a stack overflow when dumping shaders.

It ended up being pretty much as the original code Michal had before,
before I went on a cleanup rampage on it and took things that ended up
needing...

jbarczak/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,adobe/glsl2agal,KTXSoftware/glsl2agal,mapbox/glsl-optimizer,KTXSoftware/glsl2agal,djreep81/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,metora/MesaGLSLCompiler,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,adobe/glsl2agal,adobe/glsl2agal,wolf96/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,adobe/glsl2agal,wolf96/glsl-optimizer,KTXSoftware/glsl2agal,benaadams/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,mapbox/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,KTXSoftware/glsl2agal,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,adobe/glsl2agal,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,jbarczak/glsl-optimizer,KTXSoftware/glsl2agal,benaadams/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,mapbox/glsl-optimizer,metora/MesaGLSLCompiler,mcanthony/glsl-optimizer,mcanthony/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer