Use scalar annotations on interval-mode scalar bar.

This commit renders user-provided notes associated with specific
scalar values on the interval-mode scalar bar. Previously, only
the categorical mode rendered these annotations.

Also, provide the scalar bar with an optional swatch
to illustrate the color assigned to NaN values.

Add an option to color leader lines from the scalar bar to
the annotation labels by the corresponding scalar value.

This commit also breaks the process of rebuilding the scalar bar
into several virtual methods so that subclasses (particularly
ParaView's `vtkPVScalarBarActor`) can reuse more of the base class
functionality. The process is now separated into 2 phases: layout,
where bounding boxes for scalar bar components are placed; and
configuration, where actors are positioned and geometry is created.
This includes some changes to text actor to support constrained
placement and text size queries.

Add a test for the new scalar bar options.
There are now many more options controlling how the scalar bar behaves.
In particular many settings interact with the way geometry is rendered:
the lookup table may be indexed or not (thus tick marks may not be
rendered); the orientation may be horizontal or vertical; annotations
may be rendered or not; the NaN annotation may be omitted; leader lines
to annotations may be colored by the scalar they annotate or by the label
color; and the tick marks may precede or succeed the scalar bar.
Also, we must test how empty labels are handled and how even vs odd
numbers of labels affect placement (since the algorithm for placement
behaves differently in these cases).

We cannot perform a full factorial test, but do test independent
configurations.

Finally, this commit improves the performance of prominent value
detection for primitive-type arrays (e.g., int, double) by avoiding
the use of vtkVariant instances to hold the working set of distinct
values during sampling.

Change-Id: I852f9b497d5e6ab619d9d7b763f641c44e4869cf
Allow empty string rendering to succeed.

An empty string should not be considered an error condition.

Change-Id: Ia19c3b6a459897b54901920eac1fa2f3826e6fba
Pad scalar-bar title to prevent ugly layout.

Change-Id: I3f69aa027f2228470a31a47872a8ffd53637ced8
More adjustable scalar bar widget.

Now the padding around text and the border can be adjusted.
Also the relative amount of space taken up by the title and
tick labels can be changed as can the thickness of the scalar bar.

Change-Id: Ic66514a80feb0d2c81fd9daa67f743b9a619b529
Better aesthetics for scalar bar actor.

Change-Id: I489209a89ad12fc64ece0fa9023977a72578790e
Merge topic 'scalar-annotation' into master

36b22827 Better aesthetics for scalar bar actor.
3893b0be More adjustable scalar bar widget.
07be3e42 Pad scalar-bar title to prevent ugly layout.
8a7aaf67 Allow empty string rendering to succeed.
55cb7e11 Use scalar annotations on interval-mode scalar bar.