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
Changes resulting from discussion around pull request 118.
Hypothesis tests:
- Out-of-bounds checks for transition states
- t-test/f-test: UDAs return NULL in case of insufficient data
- Wilcoxon-signed-rank test/Mann-Whitney test: Updated testing of ties. For WSR tests, I added a new precision parameter. This parameter has to be used in the unit test.
- Disabled module on GPDB4.0 because ordered aggregates are required
- If UDAs are not properly used as ordered aggregates, the error messages are now more informative.
- UDA chi2_gof_test now has default arguments

k-means:
- Fixed a wrong schema name in test
Hypothesis tests:
- Disabled installation on PostgreSQL 8.4 because it does not support ordered aggregates.

madpack:
- Updated GPDB 4.0 Modules.yml file to reflect recent changes in global Modules.yml file.
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.
Minor changes resulting from discussion around pull request 139, and a few other minor changes necessitated by the merge.

Hypothesis tests:
- Minor modifications to adapt to C++ AL changes (which occurred between the code review and the merge).
C++ AL:
- Compatibility with PG8.4 and GP4.0. This fixes previous compilation problems.
Viterbi:
- Currently uses correlated subqueries, so I disabled it on GP4.0
Build System: Fix more META.json issues
Decision Tree: Improve missing value handling for continuous features.

- Correct the behavior when IGNORE specified.
- Use average values instead of minimum values for missing cases.  It is
not clear avg is better than min.  median would be a good candidate.
Sparse Vector: Fix collation when sorting.

When comparing the C string str1 to the C string str2, we interpret
them appropiately according to the LC_COLLATE category of the current locale.

MADLIB-457