[WiP] gallium: Work in progress on OpenFIMG driver

Changes:
 - reworked ring buffer emission to automatically determine packet
   sizes and simplify state emission,
 - added batch buffer freeing,
 - optimized draw info generation a bit,
 - implemented hardware clear support.