Fixed oversight in previous commit that was mistakenly pushed to master

Jira: None

C++ code for distNorm1 called the wrong internal function. Unit test for
closest_columns function used SQL that Greenplum does not support.
Install create_table_as() workaround also on PostgreSQL

Jira: MADLIB-691

It is convenient to have a uniform interface for CREATE TABLE ... AS, e.g.,
when writing test cases that should run unmodified on all supported
platforms. Obviously, we then can rely on nothing more than the least common
denominator – which is that CTAS is defunct, and our SELECT create_table_as()
workaround has to be used.

In other words, the compatibility module should also be installed for the
PostgreSQL port.
Fixed flawed unit test for compatibility.sql_in

Jira: None

The old unit test had a non-zero chance of failing. There is absolutely no reason,
however, that this unit test should be non-deterministic.
Build support for PostgreSQL 9.2

Jira: MADLIB-662

The decision-tree code contained the function table_exists(), which calls
RangeVarGetRelid(), which used to be a two-parameter function, but is now a
three-paremter macro.
Revert commit 72b11c1 and provide a more suitable fix for MADLIB-637

Jira: MADLIB-637

The fix in commit 72b11c1 moved logic (i.e., the check whether the number of rows
in a state is 0) back to a place where it not supposed to be (linear.cpp).

I added a unit test that ensures the merge function behaves correctly when there are
no rows on one segment, i.e., when the merge function is called with the aggregate's
initial state in one of its arguments.
Multinomial logistic regression: Removed implicit conversion to FLOAT8

Jira: MADLIB-670

There is no reason that multinomial logistic regression should work with all
data set where the dependent variable could be cast to INTEGER. After all, this
implicit conversion could potentially cause unintended behavior for categorical
variables. For instance, different DOUBLE PRECISION values would be mapped to
the same category.

This conversion was a left-over from copied binary logistic-regression code,
where implicit conversion was to BOOLEAN. For binary logistic regression, the
benefits of implicit conversion outweighed the danger of misinterpretation
(which should be rather low for binary variables).

Other change:
- Moved an error message to a more appropriate location.
Fix compilation warning introduced with commit 845210b

Jira: MADLIB-662

Since RangeVarGetRelid() became a macro in PG9.2, embedding a preprocessor directive
within arguments should be avoided, as it is not portable.
k-means: Design document updated, some naming issues fixed

Jira: MADLIB-692

With k-means allowing to supply arbitrary distance functions and recentering
aggregates, the name k-means has become a bit of a misnomer. E.g., by supplying
the 1-norm as distance function and the element-wise median as recentering
aggregate we would compute a local minimum for the k-medians problem.
Due to the previous narrow focus on only the Euclidean case, the distance
parameter used to be called 'fn_squared_dist' and the recentering parameter
'agg_mean'. I replace them by 'fn_dist' and 'agg_centroid'.

Along the same lines, I removed the distance functions 'squared_dist_1norm',
'squared_angle', and 'squared_tanimoto', and only kept 'dist_1norm', 'dist_angle',
and 'dist_tanimoto'.

Other changes:
- Added default parameters to madlib.closest_column
- Added author and version information to some modules in the design document
Multinomial logistic regression: Added variable number limitation to documentation

Jira: MADLIB-665

In multinomial logistic regression, the number of independent variables cannot
exceed 65535. This limitation was added to the usage section of the
documentation.
Logistic regression: Fixed a minor problem with direction restart in cg

Jira: MADLIB-574

In the conjugate gradient method, the direction is restarted when
Polak-Ribière's beta <= 0 instead of <0.

Reason: In the Polak-Ribière (PR) fomula, beta is chosen as max(0,PR'beta),
so Hestenes-Stiefel's (HS) beta needs to be 0 when PR's beta <= 0 (not <0).
Otherwise, without the "=", HS's beta will blow up at the optimum solution.

Instead of comparing with 0, a small number is used.
SVM regression: Skip regression test for segments with no data

JIRA: MADLIB-690

In parallel mode, we build one sub-model for each segment.  In the test scoring, we should skip the segments with no source data.
Sketch-based estimators: Fixed unsafe use of user-supplied parameters

Jira: MADLIB-630

When the final function is called via
SELECT __cmsketch_final(''),
the function used to copy and return data that is at an offest not included in
the input bytea, which has a length shorter than sizeof(cmsketch).

Also removed all trailing white spaces.
Merge remote-tracking branch 'upstream/master' into madlib_677
fix madlib 690. This commit includes the fix for svm_predict_combo, lsvm_predict_batch and lsvm_predict_combo