Corrected a bug where the data window of an image is displayed incorrectly in the ImageViewer.
Simplified some arithmetic.
Merge pull request #744 from goddardl/ImageViewerUiFix

Image Viewer UI Fix
Merge pull request #745 from johnhaddon/constrainedLayoutRebased

Automatic graph layout
Moved OSLImage::shadingEngine() to OSLShader::shadingEngine().

It makes more sense there as the shade node is the one responsible for representing shaders, and it was weird that OSLObject had to use OSLImage functionality.
Added arbitrary channel and layer support to OSLImage.
Fixed dirty propagation through OSLShader closure outputs.
Moved OSLObject and OSLImage shader input to the left of the node.
Added V3fVectorData support to OSLRenderer user data queries.
Added arbitrary primitive variables output to OSLObject.
Improved OSL processor shader input acceptance.

- Only accepts OSLShader nodes if they hold a surface shader, as other shader types can't be used directly.
- Also accepts Box and ShaderSwitch connections so that shaders can be connected indirectly.
Disabled caching of OSLImage channelData plug.

Effectively it is cached already in the __shading plug, and we don't want to count the memory twice.
Fixed disappearing 0 values in OSLObject and OSLImage.

The problem was that we were using the weight of a debug closure to specify the value for channels and primitive variables. OSL optimises away any closures with a zero weight, so we were ending up with no closure, and therefore were unable to correctly manipulate the image/object. Storing the value as an internal attribute on the debug closure and always using a weight of 1 works around this issue.