FLINK-944 Changed serialization logic of CollectionInputFormat to use TypeSerializer

The CollectionInputFormat did not support collection elements which didn't implement the Serializable interface. By using the TypeSerializer generated from the TypeInformation, we can circumvent this problem. This allows to use arbitrary classes in a collection data source.