Refactor TupleTypeInfo and add GenericPairComparator

Now we have TupleTypeInfoBase, TupleSerializerBase, and TupleComparatorBase. They
are now super classes of TupleTypeInfo and the others.

Also rename compare on DataInputView to compareSerialized because Scala
cannot distinguish between the to compare methods for some reason.

This change is necessary for allowing the Scala API to reuse most of the
functionality.

The GenericPairComparator uses the new extractKeys method of
TypeComparator to compare values of any type. This replaces
TuplePairComparator and some other special-case pair comparators. This
is preparatory work for enabling support for Scala Tuples and POJO
comparators.
Perform TypeExtraction outside of Java Operators

Before, FlatMapOperator, GroupReduceOperator, MapOperator, and MapPartitionOperator
performed the Type extraction themselves while the other Operators had TypeInformation
parameters. Now the are all unified, which makes it possible to use them from the
Scala API.

Also Key extraction for selector functions is moved outside of Keys.java
Move the Iteration "Operators" to the operators package

I'm doing this in preparation for the Scala API rework, since then I can just copy over
the operators package and use them for Scala.
Make DistinctOperator and Keys use TupleComparatorBase

Was TupleComparator before which does not work when used from the Scala API.
Change ObjectArrayTypeInfo.getInfoFor to use componentInfo.isTupleType()

This is necessary because the previous test didn't work for Scala tuples.
Refactor Tuple wrapping/unwrapping in Join and CoGroup

Previously both sides were always wrapped/unwrapped, even if one side
was a tuple type. This was not compatible with the Scala tuples and is
also not necessary anymore because of the GenericPairComparator.
Move RichFunctions to api.common package

They were in api.java before but they can be used from Scala,
just like the regular functions.
Rewrite the Scala API as (somewhat) thin Layer on Java API

Don't bother looking at the diff, this is almost a complete rewrite of
the previous Scala API. This uses all the work put into the Java API,
such as TypeInformation, the serializers and comparators and the
operators.

The Scala DataSet and ExecutionEnvironment wrap their respective Java
equivalents. TypeInformation is generated by a macro that uses
TypeInformationGen and other macro support classes. The Java
TypeExtractor is completely bypassed but the TypeInformation and
sub-classes are created by the Scala type analyzer. There is special
support for Scala Tuples in the form of ScalaTupleTypeInfo,
ScalaTupleSerializer, and ScalaTupleComparator.

This also adds tests to flink-scala that are ports of the tests in
flink-java.

There are not yet any Scala specific tests in flink-tests. All the
scala example ITCases are commented out, as well as the examples
themselves. Those will be uncommented once the examples are ported. This
will happen in separate commits.
Connected Components example Scala API rewrite
WebLog Analysis example
Transitive closure Scala example
Added TriangleEnumeration examples for reworked Scala API.
Add logback-test.xml to java8-tests and logback.xml to java-examples
Adds PageRankBasic Scala example. Removes old Scala examples
Pi estimation example job in Scala
[scala] Add Field Name Key Support for Scala Case Classes

This does not change the runtime behavious. The key field names are
mapped to tuple indices at pre-flight time.

Also extends tests to cover the new feature.
Add SemanticPropertiesTranslationTest for Scala API

Fix join operator to user proper EquiJoin constructor so that semantic
properties are actually retrieved.

Fix typo, getSematicProperties -> getSemanticProperties
Add Scala API completeness Test

This is very naive right now, just checks whether a function of the same
name is available. There are lists and regex patterns of excluded
functions since not all functions in the Java API need to be available
in the Scala API.
Added LinearRegression scala example. Removed old BGD example.
Renamed java examples package