add scalar bar legend to vtkHeatmapItem

When double clicking on a column of continuous data, a scalar
bar depicting the range of values will now appear below the
heatmap.

Change-Id: I5da21f4eef1cb71a44c664682520eb6c6d880302
new class: vtkCategoryLegend

This class allows us to display a legend for categorical data.
vtkHeatmapItem has been updated to use this new class.

Other changes made in this commit include:

* Improved appearance and behavior when a legend has been scaled by
  a vtkContextTransform

* An option to draw a border around the vtkColorLegend.

* vtkColorLegend now obeys vertical and horizontal alignment unless
  SetPosition() was called.

Change-Id: I6c7c782c6f3da78103b893c43d068e81e9ef78a7
tests to cover new legends functionality

* New test in Charts/Core to color the new class vtkCategoryLegend

* New tests to cover the continuous & categorical heatmaps now
  available from vtkHeatmapItem

Change-Id: I06fa49c65e85ad421d5a360920a679379e77be89
prevent segmentation fault

This commit resolves a bug within
vtkOpenGLContextDevice2D::Private::TextureFromImage
that can potentially cause a segmentation fault.

This error occurred when I attempted to draw a 1D horizontal texture
using OpenGL v1.

Until my recent work on vtkColorLegend, this bug remained hidden
because the only tests covering this function used either a 2D
square texture or a 1D vertical texture.

Change-Id: If4e39b2216a074e37c20611c0c8412e18c2689e3
Merge topic 'heatmap_legends' into master

a3761161 prevent segmentation fault
3eba81ad tests to cover new legends functionality
352f55b5 new class: vtkCategoryLegend
e0cd2a5e add scalar bar legend to vtkHeatmapItem
fix unused variable warning

Change-Id: Ib7ce4380b4df1dcd215f319a70d250e430e2c267
Merge topic 'fix_legend_warning' into master

fe9bf22e fix unused variable warning
ENH: Update selected Filters/General to support DesiredOutputPrecision

This is first of several commits updating filters to support a choice of desired
precision (default, single, or double) for output points. It uses the equivalent
code in vtkThreshold as a model.

Change-Id: I7b87d126d9015b8e1ed2ece2368b866147d8c124