Check for NULL when getting strings from CS streams

Change-Id: I8df5fb6e0b85ca6bafd94fcbed16b95d778e3b48
Add context to new instance and command functions

This allows other mechanisms than just C functions to be registered with
the ClientServerInterpreter. Particularly, it will allow for using the
Python wrappings if available rather than building CS wrappings as well.

The implementation would use std::function if supporting it from MSVC
2008 through more modern compilers were easier (MSVC doesn't use a tr1/
directory for TR1 includes and not all TR1 functionality is available as
std::tr1 (just std::)).

All command function calling is internalized as part of this since the
context is only known to the vtkClientServerInterpreter class. In
particular, the GetCommandFunction method is replaced with a
HasCommandFunction/CallCommandFunction method pair.

Change-Id: I827ccc42e69f676e48a8453123834d6dbbb535a5
Use Python wrappings to implement ClientServer wrappings

With the unified bindings option set, ParaView will use Python as the
backing implementation for ClientServer wrapping. The goal is to
minimize the size of the build for Catalyst and the CS wrapping code is
an obvious target.

ParaView's plugins have unified bindings forced off because they cause a
circular dependency which cannot be broken (the plugin library contains
the ClientServer wrappers which, with unified bindings, requires the
Python library which requires the main plugin library for the actual
work).

Change-Id: Ieeb115799147c44822831f9c569fa37c4146b891
Raise smtesting.TestError which is an exception

The smtesting.Error object is a function which returns a bool and cannot
be used as an exception.

Change-Id: Ib7eea95ff052518b017cfabe10865cbfda708bd8
Remove reference counts from vtkSMDataTypeDomain

With unified bindings enabled, this cache's pointers get mixed up with
the Python object cache's pointers resulting in double free problems
since both store the pointer with vtkSmartPointer. The reference
counting seems to aim to allow dropping the cache after it isn't
"needed" anymore, but with Python objects floating around, at least one
instance is probably in the cache, pinning the reference count to
non-zero, so it likely has little effect in a unified-bindings world.

Change-Id: Id45ab6c11acf257f1ec989acd83f4f7c2c6d52a1
Compare addresses of the internal VTK object

With unified bindings creating ephermeral Python objects, two Python
objects containing the same VTK object are not guaranteed to compare as
equal.

Change-Id: Ic588f17128b165bee69c52b231391ce851031fe7
Fix vtkSIVectorPropertyTemplate conversion

When converting return values from a client server stream into an SI
vector property, first the types must match exactly, so any previous
uint32_array instances would be rejected. In addition, support 64 bit
returns by smashing them into 32 bits.

The reason this is necessary is that the unified-bindings conversion for
tuple return values from Python uses 'long' which is 64bit on
non-Windows machines.

Change-Id: Iad162384b6642da0e7aeb58603dd0856a462316d
Merge topic 'unified-bindings2' into next

a195b4a Fix vtkSIVectorPropertyTemplate conversion
e3ddc03 Compare addresses of the internal VTK object
5388f3e Remove reference counts from vtkSMDataTypeDomain
fbbac1e Raise smtesting.TestError which is an exception
a33226d Use Python wrappings to implement ClientServer wrappings
6e052d0 Add context to new instance and command functions
663c025 Check for NULL when getting strings from CS streams