mesa-demos: fix build with non-Mesa GL stacks

These patches from upstream allow mesa-demos to build and run against a non-Mesa
GL stack.  Thanks to Tom Zanussi for doing this work for EMGD in meta-intel, and
Otavio Salvador for confirming it also works for Freescale.

[ YOCTO #3469 ]

(From OE-Core rev: 60fabb6ea0474b19ad57873b402a608a92c5a5d4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>

(cherry picked from commit f5c9b4813ca3a2fbe0a0b2e44075f1831a899067)

Conflicts:

	meta/recipes-graphics/mesa/mesa-demos_8.0.1.bb
Temporarily disable mesa-demos

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>