SPARK-3926 [CORE] Reopened: result of JavaRDD collectAsMap() is not serializable

My original 'fix' didn't fix at all. Now, there's a unit test to check whether it works. Of the two options to really fix it -- copy the `Map` to a `java.util.HashMap`, or copy and modify Scala's implementation in `Wrappers.MapWrapper`, I went with the latter.
Good question. It appears to be licensed just like the rest of the Scala code (http://www.scala-lang.org/license.html)  Spark already integrates some Scala code and has the proper entries in `LICENSE` as a result. I can modify the text to clearly call out that part of `MapWrapper` was copied, for good measure.