Fixed class attributes for QueryBase

Class QueryBase is not abstract.
Refactored test cases to use a common base class

The database configuration is the same for all test cases. Therefore it
has been refactored into a common base class.
Ignore null values when returning results

SQL result sets may contain null values. These are not valid as literal
values in Metafacture. Hence, we ignore such values when returning a
result set as a stream.