Fix appending of scalar arrays.

The following code would fail despite logic to handle scalar values
since len(narray.shape) == 0. This patch fixes that issue.

> do = dsa.WrapDataObject()
> val = algorithms.max(do.PointData["Temp"])
> do.append(val, "Result")

val, in this case is not a scalar but a VTKArray (or similar) causing
the "fixup input array length" code to fail.

Change-Id: I2193e08d0514dcfec5903a2f49a40eb58cfe8eb9
Fix DataSet reference in when input array is passed to output.

An array would take with itself a reference to the dataset when the
array. This fix breaks the link between the array and dataset when the
array is added to a new DataSetAttributes object.

Change-Id: I3237f4194e5681a3d3dd0fe1d0583eed3d7b8e4b
Avoid exceptions on StringArrays.

dataset_adapter would raise exceptions when encoutering string arrays
(or other non-dataarray arrays). Fixed that.

Change-Id: I9b696acd6bc987fd834f10a2674ad8888e62ae9a
Fixed exceptions with older numpy version.

NumPy 1.5.1 (and may be others) incorrectly raised a ValueError
exception when numpy.frombuffer() was called with a empty buffer. This
patch handles that exception by creating an empty array using
numpy.empty() instead.

Reference:
http://mail.scipy.org/pipermail/numpy-tickets/2011-August/005859.html

Change-Id: Id138928c3fd5f407b8eb266d3274ddd1a3459de1
Cleanup MPI controller properly.

If the python script run by pvtkpython called sys.exit() explicitly, the
MPI controller cleanup logic wouldn't kick in and the controller would
leak causing test failures. Adding a Py_AtExit() handler ensures that
the controller is cleaned up when the Python interpreter is finalized,
one way or the other.

Change-Id: I5433fcc111b20b3f7f9809d4d8f61c1128b216e2
Merge topic 'python_calculator_fixes' into master

5c735a68 Cleanup MPI controller properly.
b345cec1 Fixed exceptions with older numpy version.
abf3539c Avoid exceptions on StringArrays.
4e338f34 Fix DataSet reference in when input array is passed to output.
59360cd5 Fix appending of scalar arrays.
Merge topic 'update-for-vtk-kits' into pv-master

3332b123 Merge topic 'obj-reader-relative-indices' into master
a609ca59 Merge topic 'kit-libraries' into master
c7db273e Merge topic 'numpy-composite-points-support' into master
17ef42a3 Merge topic 'more-per-block-algs' into master
0bf6b194 Merge topic 'feature/color-string' into master
848d2f49 Tentative fix for Windows build issue.
191f3c22 Added support for CompositeDataSet.Points.
14a9c306 Added sum and mean per block to Python algorithms.
4e060a69 Merge remote-tracking branch 'pvvtk/pv-master' into HEAD
e7ad167c Merge topic 'pdb-test-time' into master
1303f082 Comment out the animated PDB renders
f8692285 Merge topic 'temporal-pathline-fix' into master
30989f27 Merge topic 'improved-numpy-array-testing' into master
3399a78f Merge topic 'fix-mpi-types' into master
3c80a0a0 Improved TestNumpyInterface to cover various append implementations.
9f00b672 Merge topic 'feature/color-string' into master
...
Merge topic 'python_calculator_fixes' into pv-master

5c735a68 Cleanup MPI controller properly.
b345cec1 Fixed exceptions with older numpy version.
abf3539c Avoid exceptions on StringArrays.
4e338f34 Fix DataSet reference in when input array is passed to output.
59360cd5 Fix appending of scalar arrays.
d58dc556 Merge topic 'fix_find_data' into master
f2aba0b9 Merge topic 'vgl-update-fixes' into master
164d3b45 Merge topic 'feature/color-string' into master
e0cd5c2e Tentative fix for big-endian machine issue.
e3229b0a Add helper method to convert from SelectionField to AttributeType.
61eb46e3 Add code to clean of VGL actor cache
3bf2493e vtkWeb: Refactor fetchObject(..) to use cached objects
8fd3926b Update VGL to lastest version
1241e99b Prevent scene and clipping range from being reset
04de7021 Update version of VGL
b0953ee3 Update VGL to master
...
Merge remote-tracking branch 'pvvtk/pv-master' into HEAD

* pvvtk/pv-master:

Change-Id: I2b70ca6ffe234a82f28f1e8fbc743b1ccac19337