gallium: add PIPE_CAP_QUERY_PIPELINE_STATISTICS
nvc0: use fence to check state of queries that don't write sequence

This still isn't optimal, since the fence will signal a bit late,
but better than checking on the bo, which may never be ready if it
is shared (which is likely).
gallium/hud: add support for PIPE_QUERY_PIPELINE_STATISTICS

Also, renamed "pixels-rendered" to "samples-passed" because the
occlusion counter increments even if colour and depth writes are
disabled, or (on some implementations) for killed fragments that
passed the depth test when PS early_fragment_tests is set.
gallium/docs: fix definition of PIPE_QUERY_SO_STATISTICS
nvc0: use correct hw query for PRIMITIVES_GENERATED

It was the same as SO_STATISTICS[1] before.
nvc0: add some driver statistics queries