Build System: Fix pgxn issues recently found.

Jira:MADLIB-589

It seems the wild card in Makefile rule doesn't work with fixed target
in some environment.  Also inlucde some pgxn package improvement (it will
be rewritten in cmake in the future.)
Automatic downloads of 3rd-party source through madlib.net

Jira: MADLIB-604

By default, all URLs of third-party software is now prefixed with
"http://madlib.net/redirects/third_party.php?url=". This gives us a chance
of intercepting and redirecting in case the third-party software is no
longer available.
C++ AL: Treat MemoryContext as a hint only during memory allocations

Jira: MADLIB-606

We used to respect the request for dbal::AggregateContext when doing memory
allocations, but current PostgreSQL/Greenplum versions do not take any advantage
of transition states allocated in the aggregate context anyway. They still copy
the transition state, whenever the address of the returned state is different
from the address of the input state.

Other uses of the aggregate context (say, auxiliary data/caches for transition
states) are not currently supported by the C++ AL.

MADLIB-606 was eventually the trigger for this change.
k-means: Updated Design Document

Jira: MADLIB-522

k-means:
- The design document now reflects the upcoming k-means implementation. It also
  mentions functions from the linear-algebra module now.
- Parameters "fn_squared_dist" and "agg_mean" now of type TEXT, so that
  specifying overloaded functions is easier and does not require passing a
  regprocedure value any more

Documentation:
- MathJax is now cloned from https:// instead of git://

Build System:
- LaTeX input files for design document no longer have to be listed manually
Design doc: added convex framework; clean-up lmf

JIRA: MADLIB-578

1. intro of convex framework
2. line search pseudocode
3. IGD
4. conjugate gradient
Create gppkg from a correctly named RPM

Jira: MADLIB-622

gppkg expects that the file name for the RPM from which the gppkg is generated
follows the pattern "<name>-<version>-<release>-<arch>.rpm". Otherwise,
uninstallation will not work. This rule is now observed.
Design doc: minor fixes for convex

JIRA: MADLIB-578
1. a bug in conjugate gradient final function
Temporarily deactivate random-sampling module for gppkg release of MADlib v0.4

Jira: MADLIB-577, MADLIB-622

Temporarily remove random-sampling module. This is purely to make this commit the
head of the v0.4 branch. Since we do not yet have the logistics for supporting
old version branches yet, this simplifies the logistics a little bit.
Build system: Build pgxn zip file with 'make pgxn'

Jira: MADLIB-623

Added a target for PGXN to the build system. The release number is set in
deploy/PGXN/CMakeLists.txt, the version number is taken from
src/config/Version.yml. This packages the current source repository, so it is
best used on a clean repository.

I also fixed a problem where a directory called "third_party" was created in
${CMAKE_SOURCE_DIR}.
On PG8.4/PG4.0: Only create non-ordered-aggregate hypothesis tests

Jira: MADLIB-584

With commit cbce131 even those hypothesis tests were installed on PostgreSQL 8.4 /
Greenplum 4.0 that need to be used as an ordered aggregate. Since ordered
aggregates are not available on these DBMSs, it is arguably more user-friendly to
not create these functions at all.
Updated release notes, version number, and year of copyright in MADlib license file

Jira: None
Fix madlib-619/madlib-611(naive bayes). The changes are: 1) replacing cross joins, which is very slow for training sets with a lot of features,  whenever possible. 2) replacing union with outer join to improve performance. 3) verify the supplied attrNum is consistent with the training set.