handle some spark serialization issues

1.  itertools.tee doesn't serialize well
2.  pre-resolve the dispatched compute function
Merge pull request #2 from mrocklin/pyspark3

handle some spark serialization issues