Set Grade node's gamma plug minimum value to 0.

Also defined a GradePtr typedef.
Added const version of GafferUI::View::getPreprocessor.
Added exposure and gamma controls to the image viewer.

This is achieved by setting a preprocessor containing a grade node with appropriate settings. This does mean that any subclasses which were formerly calling setPreprocessor() to perform a conversion will have to be modified to take advantage of the new behaviour - see ImageViewTest.testDeriving for an example.

The viewer has an outstanding bug (which already had a todo) whereby the sampled colour at the mouse x,y coordinates includes the additional transforms, whereas it should not. I haven't addressed this here, but instead have added todo items describing the approach I think we should take.

Fixes #571.
Added colourspace management to the image viewer.

The ImageView class allows arbitrary ImageProcessors to be registered as colour transforms, and chosen using a new "displayTransform" plug. The ocio.py config file registers a processor for each display transform in the OpenColorIO config, and a Default transform which tracks the global display transform specified via the preferences.

Fixes #573.
Fixed GadgetWidget overlay event handling problems.

Clicking in the main part of the GadgetWidget wasn't taking focus back from the overlay, and typing in the GadgetWidget wasn't delivering events properly to overlays with the focus. We also weren't passing mouse move on to the overlay all the time, and since the overlay needs it to do proper enter/move/leave event handling, things like highlighting of hovered buttons were broken.
Removed unused gumph from MultiSelectionMenu.

The setText/getText methods are inherited from Button anyway.
Fixed crashes when MultiSelectionMenu was used in GLWidget overlay.

Using the tried and tested method from MenuButton.
Allowed Viewer toolbar to omit labels when Metadata value is "".

Also added a todo.
Improved Button appearance to work better in overlays.

The gradient is now much more subtle.
Added EnumPlugValueWidget.selectionMenu() method.

This returns the internal widget, along similar lines to NumericPlugValueWidget.numericWidget() and others.
Added icons for use in ImageView overlay.
Added toolbar UI for ImageView.
Renamed ImageNode::hash*Plug() methods to hash*().

To match every single other set of hash/compute methods in the project.
DependencyNode::affects() is now called for output plugs too.

It's becoming a common pattern to have internal plugs which hold the result of some intermediate computation which is worth caching in its own right. This was achievable in two ways :

  - By having two internal plugs. The first, an output, holds the computed intermediate value. The second, an input, receives this value by a connection and allows its use in further computations. GafferScene::Group was using this method. This method was correct, but fiddly to set up and had extra overhead in the form of the second plug and connection.
  - By having a single internal output plug, which holds the intermediate value and is accessed directly in further computations. Because affects() was not called for this output plug, implementations had to cheat and directly have inputs affect the final outputs, bypassing the internal plug during dirty propagation. GafferOSL::OSLImage was using this method. This method was slightly dodgy, but easier to implement and understand.

By calling affects() for output plugs as well, we can now implement the simpler second mechanism without having to resort to naughtiness in affects().

Note that it is possible for lazy affects() methods which were not checking the identity of the input plug appropriately to be tripped up by this - it's worth checking any node implementations in external packages before accepting this commit.
Optimised OpenColorIO with a new ColorProcessor base class.

Because the OCIO transform might mix the R, G, and B channels, the output for any channel depends on all three inputs. We were dealing with this very naively by doing all the work again for each channel. The ColorProcessor base class makes it easy to do this work just once, caching the results on the intermediate colorDataPlug() - the computeChannelData() implementation is therefore dead simple, simple passing out the right component from the intermediate results.

The new ColorProcessor base class also introduces a couple of conventions we should use everywhere (and backport to existing classes in time) :

- ColorProcessor::affectsColorData(). This forms a matching trio with hashColorData() and processColorData(), meaning that a derived class can do all of its work without having to override any of the virtual functions in more distant ancestors (previously it would have been necessary to override affects()).
- Interleaving the hash*() and matching compute*() methods in the .cpp file. Keeping the each hash next to its corresponding compute makes it much easier to verify that they are consistent.
Fixed OpenColorIO crashes on OS X.

Some googling seemed to indicate that these crashes should be limited to OS X - if we see similar crashes on Linux it's easy to enable to fix there too.
Removed stubs for Grade Op.

Now there's a proper Grade node there's no reason to use the Op, and it just makes the node menu search results annoying to have them there.
Fixed up Grade's includes.

They were out of order, and including a bunch of unnecessary things.
Removed pointless Context operations from Grade::hashChannelData().

It was getting the channel name from the current context, and then making a new context only to put exactly the same channel name into it.
Fixed Grade channel-independence hash bugs.

All three components of the colour plugs that control the grade were being hashed in for each channel, when in reality only a single component affects each channel. Fixing this should result in faster interaction and smaller caches when the user is tweaking a single channel at a time.

Fixes #338.