Bug fix: pointcloud_get should not fail when count=0.
When user asks to retrieve 0 points, success is guaranteed!
Fix wave preprocessor build error with OIIO::Strutil::format (with gcc 4.7.2).
Fix crash with cpp preprocessor when #include fails or no shader function is
defined. In case #include failed it was not properly stopping. Now it checks
the pclose exit status, but after this it could still crash with no shader
function defined, so a check was added for that as well.
Fixes for static linking of liboslcomp:
* Conflicting function names in oslgram.y when linking both oslexec and oslcomp
  libraries.
* Static initialization order issue with OSL globals TypeSpecs that depend on
  OIIO, simple solution is to move the globals array into the init_globals
  function.

(fix by Lukas Tönne)
Add parameter to OSLCompiler::compile to specify the path to the stdosl.h file,
instead of the default location of $executable/../shaders/stdosl.h.
Add ShadingSystem.LoadMemoryShader function to load a shader with OSO data
directly from a memory buffer, rather than from a file.
Rename LoadMemoryShader to LoadMemoryCompiledShader
Made README to proper markdown
Additional fixes needed to properly install the renamed README.md
Eliminate circumstances leading to an assertion, wasn't really a bug

ShaderInstance::param_range should return [begin,end), but the symbol()
function it used for the begin and end pointers would assert if past the
last symbol, which of course the "non-inclusive" end needed to be.  Ugh.
Addressed compilation error caused by using the -Werror option on g++ 4.7.2.
(This is the default option given in the ./src/CMakeLists.txt file)

Return boolean variable "ok" instead of hardcoded "false" in USE_PARTIO section of the
code.
(This section of the code is only compiled if the partio library is installed)
Bug fix in turn_into_new_op.

Also eliminate several useless clauses from constfold_mix (they can never
run because the case before them already dealt with those situations).
Improve error reporting when parsing oso, especially for unknown instructions.

In particular, when you previously compiled a shader that used a new
feature (e.g., an OSL function / oso op that didn't exist before) then
tried to use that .oso file with an older OSL-based renderer that didn't
understand the new function, it gave a pretty cryptic error message:

  Unsupported op blahblah in layer mylayer

And to make matters worse, it did this as the shader was being fed to
LLVM, rather than when first parsed.

This patch makes the message much more intuitive, as well as being
issued as soon as the oso file is parsed. To wit:

Parsing shader "test": instruction "blahblah" is not known. Maybe compiled with a too-new oslc?

This will happen earlier in the render, every time the oso is parsed
(not only if the shader happens to be executed, triggering a JIT), and
hopefully will make it more obvious that the most likely culprit is
using an old renderer with a shader compiled with a newer oslc.
Merge identical shader instances within a group.

In complex shader networks/groups, sometimes there are (inadvertently,
for convenience, or as an artifact of the lookdev tools) multiple
nodes/layers that are exact copies of each other.  For example, at SPI,
our character shaders are often organized into sub-nets for conceptual
"layers" (skin, oil, wet, etc.), each of which is structurally similar
and often may contain true redundancies including texture-reading
shaders that reference the same textures at the same coordinates.

This patch adds code that searches shader networks for pairs of shaders
that are identical -- same code, same parameter values, same upstream
connections, etc. -- and eliminate the redundant one, redirecting
downstream connections from the excised one to the retained one.

The cost for this is small: 3-4 seconds for our very complex scenes that
take many hours to render.  The results vary from scene to scene;
sometimes there's no change, but other shots have up to a 20%
improvement in both time and memory.

This new optimization can be disabled by setting the attribute
"opt_merge_instances" to 0.
oslc: Array indexing of undeclared variable hit an assertion.

This could happen for constructs like float 'float a = b[0]', if b was
never declared at all. The real error is use of undeclared 'b', but in
the chain of events that followed, it hit an assertion.
spline("constant") -- interpolate with discrete steps
Attribute "opt_layername" lets you arrange to optimize only one layer.
Improve debug info when dumping symbols
Fix subtle optimizer bug -- add_constant and replace_param_value type issues

Both of these methods took void*'s and assumed that the types of the
blind data had to match the known type where it was to be
copied. Unfortunately, there was a particular series of optimization
steps that could lead to these functions being applied to a "A=B"
instruction where A and B differed in type. In the case I was chasing
down, it was a float=int problem, and the int value was just being
memcpy'd rather than properly converted to a float. So I overhauled both
of these methods to handle the float=int, triple=float, and triple=int
cases, as well as more robustly catching any other cases that it fails
to handle.
Merge pull request #185 from lgritz/lg-optbug

Fix subtle runtime optimization bug