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.