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
Merge branch 'master' of https://github.com/imageworks/OpenShadingLanguage
minor fixes in CMake scripts