[FLINK-1252] Add support for serializing Date and Enums in the Java API

My favorite comment :P... What about `Preconditions.checkNotNull(typeClass)`?