Remove many dependencies on mesa headers.

To build with mesa, need -DMESA in makefile/config file.
17 files changed