Fixed documentation for hypothesis tests

Jira: MADLIB-624

Commit 884ff80 introduced a regression in that the three ordered-aggregate tests
{ks|mw|wsr}_test did no longer show up in the documentation. This has been
fixed. Also, all SQL macros that are otherwise defined in "SQLCommon.m4" are now
also define when running doxygen. This should increase the compatibility in the
future.

Biggest change: I moved the CMake macro 'define_m4_macros' from
PostgreSQLUtils.cmake to Utils.cmake.
Generic Convex Module: matrix factorization

JIRA: MADLIB-578 MADLIB-522

First model - low-rank matrix factorization, and
First algorithm - incremental gradient
Made use of a new python driver for iterations - the MADlibSchema is
changed to schema_madlib, but we keep the old variable name due to
the compatibility in other modules for now.
Design doc: Add Newton's to convex
Compatibility: Fix exec_sql_using.c in several database versions.

Jira: MADLIB-585

SearchSysCache1 was not available in PG 8.4, and GPDB 4.2 had some
header file issues around USE_CONNECTEMC.  The workaround was implemented
by Florian.
Compatibility: INSERT INTO ... SELECT

Removed temp table for storing returned id, use
plpgsql local variable instead.
Decision Tree: Enhance the encoding method

Jira: MADLIB-592

In MADlib 0.4 version, as we encoded the training table column by column,
the scalability was not good and the encoding time was very long for some
datasets with a large number of columns, such as internet_ads (it has about
1600 columns).  Now, we encode all the columns of training table in parallel.
Decision Tree: Replace agg functions with C

Jira: MADLIB-605

Write some C aggregate functions to improve the performance of C4.5/RF.
Decision Tree: Performance Improvement on Tree Growing Engine

Jira: MADLIB-607

This file implements the tree growing engine for C4.5 and RF, which includes
training, classification, scoring and displaying.  There are few changes on
classification/scoring/displaying/cleaning.  Most of changes are in training
process.

The steps of training:
0. Encoding the training table.
1. Generating ACC (a group by statement).
2. Generating ACS and calculating SCVs and finding the best SCVs (in a single
SQL statement).
3. creating the child nodes (a sigle SQL statement).
4. Iterate the step 1 to step 3 until we met the stop condition.
Decision Tree: Peformance Improvement on APIs of C4.5 and RF

Jira: MADLIB-608

For C4.5, there is no changes for the training/classification/scoring/
genrules/displaying/cleaning.  For RF, we remove the max_split_points parameter
in the training API, since we don't need it any more as we observed better
performance now.  Another change is that for both C4.5 and RF, we now can use
an encoded table as training table.
Decision Tree: Fix RLE column compression version check.

4.2.0. was a bit too early to use RLE_TYPE for the column compression.
C++ Abstraction Layer: Added an initial revision of "modular transition states"

Jira: MADLIB-499

List of changes:
- Initial revision of transition states that allow recursion and reusability: A
  transition state can consist of other transition states. No serialization
  takes place, instead we operate directly on the byte stream.
- Adapted linear regression to the new programming model.
- Added a new type 'blob' within the database that is 8-byte aligned. (The
  PostgreSQL default for bytea is only 4-byte alignment, which is not enough.)
C++ Abstraction Layer: Reorganized the new modular-transition states code

Jira: MADLIB-499

Changes:
- Made "dynamic structs" an integral platform-independent part of the
  abstraction layer.
- Dynamic structs now can be initialized even with ByteStreams that are not long
  enough. E.g., this could happen in the merge function, when one segment did
  not have any rows.
- Started minor modifications to the existing platform-specific part of the AL:
  E.g., MutableTransparentHandle<typename T> is gone in favor of
  TranspararentHandle<typename T, bool IsMutable>. This needs to be continue
  for other platform-specific classes.
Random Forest: Change the return type of rf_train from RECORD to rf_train_result

Jira: MADLIB-631

I tracked the history of the file in our local repository.  It seems we made
a mistake for replacement.  The RECORD type will affect the cases which check
the field in the result type.
Added user doxygen for LMF
Decision Tree: Fix scoring API failure caused by the wrong encoding result.

Jira: MADLIB-632

During encoding, we should not btrim the attribute value, since we will use it
as join key between encoded table and raw training table.  The second problem
was we always used 'explict' option during encoding in classification/scoring.
We should have used the passed parameter.
Naive Bayes: Assorted performance improvements

Jira: MADLIB-611, MADLIB-619, MADLIB-626

The changes are: 1) replacing cross joins, which was very slow for training
sets with a lot of features,  whenever possible. 2) replacing union with outer
join to improve performance. 3) verifying the supplied attrNum is consistent
with the training set.  4) replacing count(distinct value) with group by.
Association Rules: Generate readable output rules for Apriori

Jira: MADLIB-411

The old output wasn't readable, since it use sparse vector to represent the
rules and contains some useless columns, such as hash_list, hash_key.  As per
discussion, for a rule A=>B, where A/B is the itemset, we will use an array to
kept the original items in the itemset.  For example, for
rule i: (a, b) => (c), we will have two columns: one is pre, which stores
{a, b}; the other is post, which stores {c}.
Linear Regression: Fix a wrong check caused by new linregr

Jira: MADLIB-637

A bug in merge function:
Wrong check was triggered if one of the segment is merged as a "stateRight"
does not have tuples.
Decision Tree: Change __get_schema_name to VOLATILE

Jira: MADLIB-640

Training function failed when the result tree table is under default schema.
The scenario is, that we create the table 'car_tree' and then call
get_schema_name function to retrieve the schema of that table from
pg_namespace.  As this function (__get_schema_name) is stable, it just
return null.  The solution is change it to VOLATILE.
Sketch Estimators: Fix merge function causing wrong results

Jira: MADLIB-567

The issue was in the merge function when the size of the input was large enough that
we switch from exact calculations to sketch based estimators.  The merge function was
failing to correctly account for the internal structure of the sketch data and OR-ing
the wrong byteas.