gallium: make pipe_context::begin_query return a boolean

This can be used to check if a query is unable to start.

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

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
mesa/st: implement GL_AMD_performance_monitor

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

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