kmeans: fix for handling NaN values (MADLIB-364)
Merge pull request #115 from agorajek/kmeans

kmeans: fix for handling NaN values (MADLIB-364)
Add schema qualifiers to commutator/negator in svec.

MADLIB-470
Fix for MADLIB-459: UnboundLocalError: local variable 'rv' referenced before assignment
Improve the table existence check method.

The original implementation of MADLIB.__table_exist did not consider schema
for temporary tables.  We reimplement this function in C in order to not be
bothered with corner cases such like not only the temporary table but also
double-quoted names and non-ASCII characters, etc.  Add a test case for the
temporary table issue.  The code is currently under decision_tree, but this
particular function should move to somewhere else more general later.

MADLIB-416
Decode the 'Class' column of the result table.

The value of the 'Class' column was the encoded integer, and users needed to
decode it to the original value.  Now we decode this inside the classify
function for more convenience.

MADLIB-434
Fix the out-of-memory issue in decision tree.

As the number of attributes may exceed 1000, the jump array in the
tree_table was consuming unreasonable amout of memory, even if the number of
actual element in the array was relatively small.  Therefore, we change
the representation of the jump array to two integers to reduce this memory
consumption, and at the same time remove __jump_aggr(), an aggregate
function implemented in PL/pgSQL, to optimize the performance.

MADLIB-381, MADBLI-382
Update the comment on the classify function.
Decision Trees: - Fix the non-ordered aggregate version of decision tree display.

In the current version, there is no tree ID in the result tree table.
Therefore, remove the related code.  Now, it can run successfully in
Postgres8.4 and series version.
Decision Trees: - C4.5 code refactoring and optimization.

The code changes include two main parts.
1. code reformatting, such as comments refinement, code style consistency, etc.

2. performance improvement.
2.1 continuous attribute optimization: Users can choose 1~n feature
values as the split value. This will not apply to C4.5 for now.
It will be used for RF.

2.2 The operation after found the best attributes will be done in parallel
except for the create child nodes (we sequentially generate the IDs for new
created child nodes).

2.3 Calculate the ACS set feature by feature.

An observed result of this optimization:

KDD dataset (4,898,431 rows), running on 24 segments with 3 hosts

Before: 00:19:30.403121.
After : 00:11:42.736067.
Sparse vectors:
- In C header file, made several literals long long
- Added conversion functions between legacy sparse vectors and Eigen sparse vectors
C++ AL:
- All files in the PostgreSQL connector now properly declare namespaces (as opposed to assuming that they will be #include'd in the right namespaces). The previous ugly workaround for Doxygen is no longer necessary.
- GP/PG Compatibility functions (implementation of missing APIs) are now header files
- GP now has its own dbconnector.hpp file that should be included
C++ AL:
- The AbstractionLayer class was used like a namespace. This has been corrected in that the AbstractionLayer class has been completely removed. Any occurrences where inheritence was used to import names have been accordingly modified (and corrected).
- The caching of database metadata has been encapusalted in the new SystemInformation, FunctionInformation, and TypeInformation classes. 
- Many backend functions have been wrapped by a madlib_* function that puts a PG_TRY()/PG_CATCH() block around the function. This is in the new backend.hpp
- Simplified the files containing UDF declarations
- Included sparse vectors in the type system
C++ AL:
- Added new class FunctionHandle. It is now possible to pass the OID of functions and use and call these inside C++ code like function pointers.