Fix accumulators and serialization in LocalSpark.