Add Daisy Zhe Wang and her students' work on Feature extration and Viterbi.

This module does not support Greenplum 4.0, where ordered aggregates nor
correlated sub-queries are not supported.  I'm committing this with a little
editorialization and compatibility code, while there are some TODOs all
around the code and comments.  We will improve them in the future work
to separate the original work and additional modifications.

Kun Li, Joir-dan Gumbs, reviewed by Caleb Welton and Hitoshi Harada.
Decision Trees: - Add TEMP keyword to auxiliary table.

MADLIB-481
Feature Extraction: - Fix compatibility code.

GP 4.1 test showed we never run array_agg, due to the typo in m4 macro.
Changed header-file patch for GP4.1 so that it will not fail in cases where it has already been applied.

Background: In GPDB development environments, the patch version may be reported as 0, even though the header file is based on a much newer patch version.
In these cases, the previous patch would fail. The new implementation uses 'sed' instead of 'patch'.
Madpack:
- Add -t option to specify cases to test. Usage: "-t module[,module[,...]]". This resolves MADLIB-482.

This option is effective only in install-check at the moment.
Support Random Forest.

Random Forest (RF) is an ensemble classifier that consists of multiple
decision trees (DTs) and outputs the class that is voted by the majority
of the individual trees.  A prominent advantage of RF is its unexcelled
accurary.  This is the main reason why we support RF in MADlib.  MADlib RF
is based on Leo Breiman and Adele Cutler’s RF algorithm and runs directly
within a database.

Our RF implementation is based on MADlib DT without error based pruning and
reduced error pruning.  But we add a parameter, named max_split_point, to
control how many feature values will be treated as split values.  Using this
approach, in most cases, the total time of training an RF can be decreased
a lot.

MADLIB-419
Random Forest: - Fxi minor document issues.
Feature Extraction: - Improvement per review and test.

This rearranges assorted code that was making it inconvenient from user
perspective.  viterbi_mtbl and viterbi_rtbl are now created inside
text_feature_extraction() and index is created at the same time.
viterbi_mtbl was hard-coded in text_feature_extraction(), and now
it accepts argument.  vcrf_label() took an argument for a schema name
but it didn't use it in a good way, so now the argument is deprecated.
Also some tables in the install_test() that seemed to not be used are
removed entirely from the source.
Decision Trees and Random Forest: rename files

Extract common code for c4.5 and random forest, and perform file renaming.
The changes are:

- Change the module's name to 'cart' from 'decision_tree'.  We will add
  regression tree's function to this module.
- Change the name of 'utility.sql_in' to 'dt_utility.sql_in'.
- Change the name of 'decision_tree.c' to 'dt.c'.
- Separate the file of 'decision_tree.sql_in' into two files, namely
  'dt.sql_in' and 'c45.sql_in'.  The first file contains the common
  functions shared by c4.5 and random forest. The second file contains
  the c4.5 APIs.
Decision Tree: Add check for the parameter max_tree_depth.

MADLIB-488
Decision Tree: Replace overlooked constant schema name.

MADLIB-494
Decision Tree: Filter NULL values out in generating ACS sets.

The unexpected NULL values caused random sort result when computing the
best split point.

MADLIB-489
Drecision Tree: Fix a bug when growing too deep.

If we use DBL_EPSILON, then the split criterion value(SCV, such as infogain,
gainratio, or gini) will not be treated as zero although they are really zero
(6.66134E-16, 4.44089E-16 or -4.44089E-16). Therefore, we will grow the tree
(create child nodes), since the SCV is not zero (If it's zero, we will treat
it as leaf node). At this point, although we only have two discrete features,
the tree will grow again and again (The SCV is not zero). Therefore, the number
of parent discrete features (the array length) will be exceeded.

Also add a check for dp_ids not to access out of range.  If the length of dp_ids
is greater than or equal to the number of discrete features, it means something
is wrong, such like the the zero-test above is still too precise.

MADLIB-486
Build System: Support CREATE EXTENSION in PG 9.1+.

We add two build targets, extension and extension-install.  The "extension"
target builds and creates extension-related files and "extension-install"
target copies directly to the postgres installed directory without madpack.
Avoiding madpack seems good for the upcoming PGXN support, too.
I tried to find a way to make the extension relocatable, but for now
the extension is not relocatable as a lot of code assumes the fixed
schema name at the time it's installed, but users can specify schema name
on CREATE EXTENSION with SCHEMA option.

MADLIB-316
Support PGXN.

The requirement of PGXN support is, to let users do

 $ pgxn install madlib

to install extension files in postgres install directory.  After that,
users can CREATE EXTENSION in SQL.

The way pgxn client works is download the zip file, unpack it, enter
the directory, configure if any, make install.  To be compatible with
this, we create a Makefile in the top directory when configured, and
let "make install" be "make -C build extension-install".  This becomes
a little surprising behavior to the normal usage out of PGXN, so
the configure creates such Makefile only if the packager indicates,
by creating META.json file in the top directory.  This is automated
with deploy/PGXN/pgxn.sh, which clones an arbitrary git repository and
m4 META.json_in into the cloned directory, then zip it.

We still need to work on the automation of META.json, but for now
we will package as stands and learn how to do it later.

MADLIB-334
Build System: Fix minor issues META.json.
New Statistics module (initial version):
- Implemented one-sample t-test and two-sample (pooled and unpooled) t-test
- F-test
- Kolmogorov-Smirnov test
- Mann-Whitney test
- Wilcoxon-Signed-Rank test
- Implemented One-way ANOVA
- Added Pearson's chi-squared goodness-of-fit test (for arbitrary distributions). Can also be used as a test of independence.
- Added unit tests for all of the above

Utility module:
- Added small but common utility functions: assert() and relative_error()

C++ AL / utilities:
- Allow "masquerading" mutable references to be passed by reference to the real type
- Added names for constant-size vectors (so far only for size 2 and 3)

Documentation:
- Added module hypothesis tests
- Added warning for Wilcoxon-Signed-Rank test. This needs to be solved.
Documentation:
- doxysql: Support for aggregate default arguments and the NULL keyword
- Added a bibliography database (in BibTeX format) that we can use in doxygen
- Added amsfonts package to LaTeX generator

Build system:
- Bumped version number to 0.4dev
Documentation:
- Updated hypothesis-tests module. Gave more precise description of what is computed and how. Included example for chi-squared test of independence.
Hypothesis tests / One-way ANOVA:
- Fixed bug in merge function