New texture tests
IC/TS attribute 'substitute_image' lets you force all texture refs to a single image.
oiiotool --fill
New testtex options: --aniso, --stblur
safe_sqrtf clamps to avoid NaN
Anisotropic texturing overhaul and fixes.
(a) Proper computation of the major axis on which to place the samples;
    previously, it was assuming the major axis was the same as the larger
    derivative.  That's true if the derivs are orthogonal in texture st
    space, but not for arbitrary angles.  Solving this fixes a number of
    artifacts, that tended to be only visible with added "blur", but were
    pretty ugly with blur discontinuities.
(b) Adjusted the strategy we were using for "conservative" dealing with
    extreme anisotropy to get a better visual result.
(c) Eliminate a 2x error where we were not distributing the samples far
    enough along the line.
(d) Apply Gaussian weights to the samples.
Update testsuite reference images
Merge pull request #417 from lgritz/lg-texblur

Anisotropic texture blur fixes
Guard against numeric problems with texture filter ellipse computations.
Found cases where our shortcut in nsamples was leading to aliasing. So
switch to the theoretically correct nsamples = 2*aspect-1, eat the minor
extra cost to avoid aliasing of patterns in anisotropic regions.
Filter ellipse refinement: simplify math with new (equivalent) formula
confirmed by computer algebra program.
Merge pull request #422 from lgritz/lg-texblur

Texture blur fixes
Allow cmake EXTRA_CPP_DEFINITIONS variable to inject compiler flags
Remove incorrect extra profile build flags
Change threads.h to set USE_TBB=0 if undefined.
This doesn't actually change anything about the OIIO build -- the
CMakeLists.txt still defaults to USE_TBB=1.  But if thread.h is used
by another application, this will make it "safe" regardless of whether
OIIO was build with or without TBB (the other app will fall back to our
intrinsics, unless they explicitly set USE_TBB=1, which they should only
do if they are confident that OIIO was also compiled that way).
Fix non-pow2 tiles for accum_sample_closest (previously done for other modes)
Add missing export symbols for WIN32
Fix compilation for Windows

Move #pragma comment(linker, "/subsystem:windows /entry:mainCRTStartup")
back to its right place.
targa writer crash fix
Spinlock improvement: relax the barrier conditions for lock & unlock.
Our trylock and unlock used full barriers. Doing some reading on the net,
it seems better to use the GCC intrinsics __sync_lock_test_and_set and
__sync_lock_release, which use acquire and release barrier semantics,
respectively.  And indeed, the is a substantial performance improvement for
both spinlock_test and spin_rw_test benchmarks, and verified by actual use
of the TextureSystem in a renderer.