vtkMySQLQuery incorrectly returning non NULL values

When querying a table which has columns which may be null this class
returns non-null values when it shouldn't. For instance, for the table:

CREATE TABLE myTable (
  myIntValue int DEFAULT NULL,
  myFloatValue float DEFAULT NULL
)

Columns myIntValue and myFloatValue may be set to null, but when reading
these values using vtkMySQLQuery the values 0 and 0.0 are returned
instead of NULL.

The reason is found in vtkMySQLQuery::DataValue().  Specifically, in the
switch statement there are several return statements which do the
following:

  return vtkVariant(base.ToInt());

When the value is NULL the variable "base" is correctly set to an
un-initialized state. Calling ToInt() returns 0 even if it is not a
valid number (NULL).  This patch addresses the problem by returning
the base variant without converting to int/long/float/double if the
value is NULL.

Change-Id: Ifbea52c2c1fb3ed6ccd3e9f7753f3f669c46f5e8
Merge topic 'mysql_query_null_fix' into master

c4d2fc93 vtkMySQLQuery incorrectly returning non NULL values
Do not try to delete a WeakPointer

Change-Id: I34a0374ca75c46309313a9b576af0b748e2324e9
Merge topic 'fix_memory_leak' into master

abda2e52 Do not try to delete a WeakPointer