Implement a Texture Conversion Emulation recipe

A patch for issue #31.

Under an GLES2 API (and specifically Pepper implementation of GLES2),
calls to glTexSubImage2D may be required to use a type and format for
the new data that matches the underlying texture type/format, so that
the GLES2 implementation is a simple, straight copy of the data.

This means that in order for Regal to emulate the less strict OpenGL
interface, it must perform texture format conversions when calling a
GLES2 backend.

This patch adds such an emulation recipe, that:

1) Shadows the state of textures, so that Regal knows the underlying
formats, and
2) On a call to glTexSubImage2D, if the caller is passing something that
doesn't match the underlying texture format, Regal will handle the
conversion.

This patch makes a few assumptions that may need to be relaxed with
further changes:

* Only OpenGLES 2.0 compatible texture types and formats are supported.
  GL_BGRA and GL_UNSIGNED_BYTE_3_2_2 for example, while easy to add, are
  not. Other more general OpenGL formats could be added to, with a bit
  more work.
* As per the GLES2.x spec, only GL_UNPACK_ALIGNMENT is assumed to be
  relevant.
* To avoid a combinatorial explosion, all texture conversions are too
  and from a simple GL_RGBA, GL_UNSIGNED_BYTE intermedate format.
Merge from git://github.com/adhoc-bobcat/regal.git gles2_texture_conversions - some conflicts resolved manually.
Merged texture conversion emulation layer.
Logging refinements

Per-toolchain debug and release flags for Makefile build.

Regal sampler object refinements.

Logging refinements - REGAL_LOG_MAX_BYTES=n for limiiting raw bytes, REGAL_LOG_MAX_BYTES=0 to omit pointers.

Extend boost::print to support optional output.
Allow Export.py to be run from any directory.

Before this change Export.py only worked from project root.
Export.py: Create output directory if it not exists.

This also adds error message when output dir is not set.
Export.py: outdir.strip() is unnecessary.
scripts: Rename genArgs.outdir to genArgs.srcdir

Because this is what it really is.
scripts: Outdir should contain src and includes.
Merge branch 'master' of git://github.com/techtonik/regal
make export - Export.py command-line has changed.
Makefile defaults to MODE=release
Texture parameter logging improvements.
boost::string_list support for splitting glShaderSource string arrays, with optional delimiter
Optional logging of pointers - REGAL_LOG_POINTERS=1 by default
Optional logging of thread, per line of log output - REGAL_LOG_THREAD=0 by default
In Init::context, avoid assertion if thread was previously associated with the context
Optional writing to shader cache - REGAL_CACHE_SHADER_WRITE=1 by default in debug mode
Initial test coverage added for boost::string_list
Add makePath utility function for joining a directory and filename.
VC10 projects for building regaltest.
Move Regal::Thread dependency from RegalPrivate.h to RegalContext.h
Add jsonsl to src tree, for parsing JSON data.
Extend boost::print to support pad(width) operator for indentation.
Info logging for shader caching.
Logging enhancement for texture parameter.
shaderSourceStrings - to NUL-terminated string.
Build regaltest as part of all Makefile target.
Fix broken nacl build
Rename Regal::RegalTexC to Regal::Emu::TexC
RegalSo sRGB support for ES 2.0
Add support for masking the buffer bits used for MD5 hashing purposes
RegalSo fixes and optimizations.
Helper functions for pixel components and bytes per component.
Fixes for native client/PPAPI Linux

1) A few places assumed REGAL_SYS_PPAPI meant Windows/MSVC when in fact
Pepper is a valid option on Mac and Linux as well.

2) Initialize maxVaryings to zero before calling GetIntegerv. Pepper
GLES GetIntegerv for better or worse asserts that the output destination
memory is initialized to zero or negative one, though I saw nothing in
the spec that indicates it is required.
README.rst: Add download link
GitHub doesn't support Downloads anymore
Merge branch 'fix_nacl_build' of git://github.com/samclegg/regal
Merge branch 'ppapi_linux_fixes' of git://github.com/adhoc-bobcat/regal
Merge branch 'patch-1' of git://github.com/techtonik/regal
Resolve compiler warning for RegalFrame.cpp.
Merge branch 'master' of git://github.com/p3/regal.git