CHANGES
Bump versions now that we've branched 1.3
New ShadingSystem attribute "renderer_outputs" enumerates the renderer outputs
(AOVs) explicitly, so that elision of unused outputs can be done with
full understanding of which params will or will not be used.
Beware: if you use "opt_elide_unconnected_outputs", you MUST pass
"renderer_outputs" or your outputs may be eliminated!
Add a way to set arbitrary OSL options from the testshade command line
Middleman optimization

When you have 3 layers A, B, C, and connections A.aout -> B.bin and
B.bout -> C.cin, sometimes it turns out (either by design or after other
optimizations) that B simply unconditionally copies bin to bout.  This
optimization notices this case and "eliminates the middle-man" by
directly connecting A.aout to C.cin if the types are compatible.  This
allows even more optimization since B.bout is no longer connected to
anything, and it may even lead to elimination of the B layer entirely.
Layer-to-layer global propagation

We were already good at noticing that a connected parameter's upstreadm
output is guaranteed to be a constant, and then replace the downstream
parameter with that constant (no longer needing the connection at all).

Now we also add logic to notice cases where the upstream output is
guaranteed to be assigned a global variable (such as N or u), and
we can alias the downstream parameter to that global, just as if it
was assigned the global as a default argument in the same shader (also
no longer needing the connection at all).
Fix test reference output
Be less conservative about constant propagation from layer to layer.
It used to do so if the output of the earlier layer was never used in the
upstream layer; I suspected that it's only important for it to never be
written, of course who care if it's read by the upstream layer.  Looks like
this change doesn't break anything, while increasing the number of
connections it can remove by constant propagation.

But, also, DO make sure it's not a parameter that can be overridden by
geometry. I think that might have been a latent bug.
Merge pull request #236 from lgritz/lg-middleman

Layer/connection simplification improvements
Eschew 'ifdef/ifndef DEBUG' in favor of the "standard" NDEBUG.
Added cmake option to enable/disable RTTI.
Workaround cmake bug where some platforms don't set NDEBUG for RelWithDebInfo
Fix 'debugnan' feature to not give false positive for arrays and components.

The way the optional "debugnan" feature works is to insert code that,
every time a symbol is written to, checks it for NaN or Inf values.  But
it simply checked ALL the data for that symbol, so if the symbol was an
array or an aggregate (like a color), upon something like a[0] = 0, it
might still issue an error if a[1] (as yet uninitialized) coincidentally
contained the right bits for a NaN. This kind of "false positive" could
interfere with debugging an actual NaN which occurred elsewhere.

So this patch makes the debugnan checks much smarter by having a special
case for 'aassign' (array assignment) and 'compassign' (component
assignment) ops, and in that particular case only checking for NaN/Inf
values in the particular array element or component that was just written.
Runtime constant-fold of cellnoise calls
Simplex noise

This patch implements noise("simplex",...) for OSL. Like the "perlin"
noise, it's aperiodic, ranges on [-1,1] with a large-scale average of
0. There's also "usimplex" which is the unsigned version -- range [0,1]
with an average of 0.5, analogous to our "uperlin". I have NOT
implemented a periodic (pnoise) version of simplex noise; since it's not
a rectangular grid, imposing a rectangular periodicity is a bit trickier
to implement, so I'll hold off on that unless/until there's a
significant demand.

Simplex is similar in character to Perlin noise but has some important
differences:

1. At 2D and higher, the frequency content is a bit higher than Perlin
noise (that is, the waves are steeper and closer together. This is
because the simplex vertices are on average closer together than the
rectilinear grid vertices of Perlin.

2. At 2D, the simplex noise bumps fully blend into each other (as Perlin
does at all octaves), but at 3D a single octave looks a bit more like
separated bumps, and it's very noticeable at 3D. This is all pretty
noticeable with a single octave, but much harder to see when multiple
octaves of noise are used.

3. Also because of the layout of the simplex grid, there is a some
directionality visible in 2D planar slices of the 4D noise. You may find
this objectionable, or maybe for a curved solid object, you won't notice
it at all. Use your best judgment.

Simplex noise is currently about 5% slower than Perlin for 1- and 2-D,
about 10% faster than Perlin for 3D, and over 2x faster than Perlin for
4D noise. So at 3D and especially for 4D (especially the latter), you
may prefer it for performance, if the look is acceptable.

The underlying implementation of the simplex noise is based on public
domain code by Stefan Gustavson, though heavily modified.
Fix shared_ptr ambiguity

Have an OSL::shared_ptr, which is either std::shared_ptr (if C++11) or
boost::shared_ptr (not C++11).

Change all explicit refs to boost::shared_ptr and the occasional
implicit reference to OIIO::shared_ptr, all to OSL::shared_ptr.
Fix pair construction problems with some compilers
Update PDF docs
Simpler formulation for  Dual distance.
Check format/printf/error/warning format string versus argument.
It's an error if it can be detected at compile time.  If not, then
at least do something safe at runtime by substituting the default
format for whatever type is actually passed.