[FLINK-1026] Fix PojoComparator

Was not using the user code class loader and therefore could not clone
the serializer that is internally used.

Also modify KMeansForTest to make use of the PojoComparator to prevent
such bugs in the future.

Also fix PackagedProgramEndToEndITCase, AvroExternalJarProgramITCase and
the external jar file class loader tests in flink-clients. The pom was
not configured to remove the code that should only be in the external
jar from the test-classes directory.