driver: state caching

Keep a context. Write only state that changed actually changed
to command buffer.

Also reduce number of etna_reserve calls.
driver: merge consecutive state updates
driver: build context

First step towards support for multiple concurrent rendering programs
with v2 driver (v4 driver requires different approach with state deltas,
but that can be done in a similar way later).
driver: set GL_API_MODE

On GC2000 there is a register GL_API_MODE that sets the global API mode
for the context. I do not know what it does, but if another application
left it at OPENVG/OPENCL that could have unpredictable consequences.
Set it to OPENGL at context creation.
driver: don't forget to update context for vertex elements / shader data

FE_VERTEX_ELEMENT_CONFIG / shader INST_MEM / shader UNIFORMS are
handled specially, but still need to update the context object otherwise
latter updates assume the wrong state.
driver: remove dirty bit for base setup

No need to even have a dirty bit for ETNA_STATE_BASE_SETUP,
those bits are set up on context creation and guaranteed to never
changed.
tools: output statistics from gen_weave_state

Also do a few comment clarifications.
fb: link with CXX instead of CC

This solves the linking problem when compiling with ETNAVIV_HOOK=1