[RFC] mesa/st: implement GL_AMD_performance_monitor v3

This is based on the original patch of Christoph Bumiller.
(source: http://people.freedesktop.org/~chrisbmr/perfmon.diff)

V2: (Samuel Pitoiset)
 - Fix compilation
 - Improve the original code
 - Rewrite some parts of the original code

V3:
 - Do not use pipe_driver_query_info::min_value which is always set to 0

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
[RFC] mesa/st: enable GL_AMD_performance_monitor

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>