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.
Decision Tree: Add unit test for checking the variable names in the returned type of c45_train/rf_train

Jira: MADLIB-633

There were no unit tests for checking the returned type.  It would be better if we have
the checking so that we can find the changes during development.
New Method: Cox Propotional Hazards tests

Jira: MADLIB-576

This method is not supported in GP 4.0 and PG 8.4 due to the lack of ordered aggregate.
In PG 8.4 the functions are defined in the catalog while they are not installed at all
in GP 4.0.
LMF: Improve output matrix indexing

Jira: MADLIB-578

After helping Sarah from the DS team to use this the first time, some
usability is improved, mostly on making the output easier to be interpreted.
Also improved doxygen after Sarah's feedback.
New Method: Multinomial Logistic Regression

Jira: MADLIB-575

Multinomial logistic regression is a widely used regression analysis tool
that models the outcomes of categorical dependent random variables.
Decision Tree: Enhance error information on empty dataset

Jira: MADLIB-641
Decision Tree: Avoid 'divided by zero' in scoring

Jira: MADLIB-632

We use left join to ensure all the rows of classification/scoring table were breakup.  And
the class labels which don't appear in the training dataset will be treat as 0 (encoded
value).  Therefore, during scoring, those samples with 0 class label will be regarded
misclassified.  Found in madelon dataset where the class column is malformed.
Decision Tree: Insert information of the columns in which all the values are null.

Jira: MADLIB-635

During encoding process, if all the values of a column is null, then we will
remove the column from breakup table in 'ignore' mode.  Therefore, besides
insert the column information in the breakup table to the metatable, we need
to insert those columns in which all the values are null to the meta table.

Also use the quote_literal and quote_ident for the column names.