Add ClassTags to types that depend on Spark's Serializer.

This change is necessary for compatibility with Spark-1.0:
commit 7eefc9d2b3f6ebc0ecb5562da7323f1e06afbb35 in Spark
added ClassTags on Serializer and all dependent types.