Bug fix: skip padding in get_called_parameter_string

This bug is currently benign, since get_called_parameter_string() is
currently only used for functions that return true for
glx_function.has_different_protocol(), and none of those functions
include padding.  However, in order to implement marshalling of GL API
functions, we'll need to use get_called_parameter_string() far more
often.
WIP: create pointer for multithread marshalling dispatch table.

The pointer is only populated if _mesa_enable_multithreading() is
called.  Otherwise no multithreading occurs.
Annotate functions with "marshal" attribute in GLAPI XML.

Several API functions require special treatment in order to be
marshalled to a background thread.  Others can't be safely executed in
a background thread and need to be executed synchronously (e.g. since
they return data through a pointer argument).

This annotation will be used when code generating thread marshalling
code, to ensure that each function is marshalled in the correct way.

The possible annotations are:

- "draw": this is a draw call, and hence may access memory through
  pointers that were set up by a previous call to
  e.g. glVertexAttribPointer(), so it needs to be marshalled
  specially.

- "sync": this call should not be marshalled to a background
  thread--it should be executed synchronously.

Note that GL calls that return non-void are treated as "sync" by
default.
Add python scripts to code generate GL API marshalling code.

These scripts are not yet used.
Need marshal header file
Other places where we need to respect skip
mesa: Add a pthread pool implementation.

Conflicts:
	src/mesa/main/tests/Makefile.am
Stuff that needs to be added to mtypes.h
Add marshal.c
Add marshal.c and code generation to build.
threadpool: Fix deadlock if task completion races with wait_for_task.

threadpool_worker() doesn't lock the threadpool mutex before setting
task->finished.  As a result, it can race with
_mesa_threadpool_wait_for_task()'s attempt to determine whether the
task has completed, resulting in the following deadlock:

Worker thread:                     Main thread:
/* threadpool_worker() */          /* _mesa_threadpool_wait_for_task() */
pthread_mutex_unlock(&pool->m);
task->work(task->data);
                                   pthread_mutex_lock(&pool->m);
                                   while (!task->finished) /* not finished */
task->finished = GL_TRUE;
pthread_cond_broadcast(
    &task->finish);
                                     pthread_cond_wait(&task->finish,
                                                       &pool->m);
pthread_mutex_lock(&pool->m);
/* Goes on to other tasks */       /* Waits forever */

This patch avoids the race condition by having threadpool_worker()
lock the mutex before modifying task->finished.
Expand to allow for marshal flavors beyond sync and async.
Add _mesa_ prefix to marshal/unmarshal functions.  TODO: would _marshal_ be better than _mesa_marshal_?
Custom marshalling for ShaderSource.  TODO: make sure not previously marshalled.
Fixup: misspelled marshal
Whoops, updated SConscript incorrectly
Create real marshal table
Set up thread marshalling data structures
Set up thread pool
HACK: add hooks