Fix crash on normal computation when polygon is empty.

Change-Id: Ic8fdf69cfcdd758ae4e81dd075590013ba4bbd5a
KW00001404: Major overhaul of vtkAppendFilter

The previous behavior of vtkAppendFilter was to append data arrays set
as attributes and then only secondarily append data arrays by
name. This could lead to unexpected behavior as illustrated in the
following scenario:

- set two datasets are set as inputs to the filter
- each dataset has a point array named "A" and another named "B"
- in the first input, "A" is set as the scalar attribute
- in the second input, "B" is set as the scalar attribute

Previously, the output of vtkAppendFilter would append the scalar
attribute array "A" from the first input to the scalar attribute array
"B" from the second, storing the result in an array named "A" and
setting that as the scalar attribute in the output dataset. If you
reversed the order of inputs, the resulting scalar attribute array
would be named "B" and the output array would have the contents of "B"
followed by the contents of "A".

This patch changes the behavior of the vtkAppendFilter to merge arrays
primarily by name, which is more in line with how the rest of VTK
works. In the scenario above, the "A" arrays from the input are
appended together and the "B" arrays from the input are appended
together. Because "A" is set as the scalar attribute in one input and
"B" is set as the scalar in the other, the inputs disagree on which
array is the scalar attribute, so in the output no scalar attribute is
set. More broadly, if both inputs have arrays with the same name,
number of components, and data type set as an attribute, then the
result of appending those attribute arrays from the inputs will be set
as the attribute in the output. If any of those conditions are not
met, then the attribute will not be set in the output.

A somewhat special case is possible where the scalar attribute in the
inputs is set to an array with NULL name. If all inputs have their
scalar attribute set to an array with a NULL name, then the output's
scalar attribute will be an array that is the result of appending the
input scalar attribute arrays into a new array with a NULL name.

This patch also contributes a fairly comprehensive test for
the vtkAppendFilter.

Finally, this patch makes the vtkDataSetAttributes::SetAttribute()
method public instead of private.

Change-Id: Id3914957b65bfcce346968dc8fba6a3df0861cd8
Fix issue with empty arrays with numpy 1.2.1.

Snow Leopard and older use a version of numpy that has
a bug when reshaping empty arrays. The bug (and its fix)
is documented here: https://github.com/numpy/numpy/issues/2536

To overcome this numpy issue, we catch the exception and
explicitly create an empty array of the right shape instead
or reshaping the existing empty array.

Change-Id: Id89b377a66cc2b25371d6de9220963c44e0f1dbd
Merge topic 'fix_numpy_1.2.1' into master

4f3ffec5 Fix issue with empty arrays with numpy 1.2.1.
Merge topic '14599_fix_double_range_issues' into pv-master

9085e579 BUG #14599: Handle double values properly.
Merge topic 'newest-xdmf' into pv-master

fd81e559 Merge topic 'newest-xdmf' into master
d7fb5d33 Fix dashboard warnings and test failure.
9f62fa36 Merge remote-tracking branch 'pvvtk/pv-master' into HEAD
cd357552 Merge topic 'java-fix' into master
6e873b5a fix java issue
80114e9b Merge branch 'xdmf3-upstream'
9195a1f2 export xdmf for import into vtk
Merge topic 'update-vtk-20140729' into pv-master

f19689d0 Merge topic 'disable-bad-lsdyna-test' into master
c96f5c35 Merge topic 'fix-vgl-renderer' into master
3bb7f746 disable a balky test until we can fix it
c976fb41 Fix typo introduce by 06aaa805 session => m_session
f34cba0a Add missing initialization of member
94cb2b46 Merge topic 'fix-python-installs' into master
91d2c9ac Merge topic 'opengl2-osmesa-message' into master
161541c8 opengl2: use STATUS for the OSMesa message
8e8f6477 python: install packages properly
c1116e86 Merge topic 'add_parameter_to_LUT_generation_in_vtkColorSeries' into master
2ad67533 ENH: Add option to return an ordinal lookup table.
Merge remote-tracking branch 'pvvtk/pv-master' into HEAD

* pvvtk/pv-master:

Change-Id: I2113f4cc0713700b31642219a93a5247868c4443
Merge topic 'fix_empty_polygon_crash' into master

6035b814 Fix crash on normal computation when polygon is empty.
Merge topic 'KW00001404' into master

69a06e4d KW00001404: Major overhaul of vtkAppendFilter