[SPARK-4774] Makes HiveFromSpark more portable

HiveFromSpark read the kv1.txt file from SPARK_HOME/examples/src/main/resources/kv1.txt which assumed
you had a source tree checked out. Now we copy the kv1.txt file to a temporary file and delete it when
the jvm shuts down. This allows us to run this example outside of a spark source tree.
I don't think this works for non-empty directories. You'd need to recursively delete it. Instead of creating a temp directory, I'd just use `File.createTempFile()`, unless the name of the file reeeeeally needs to be `kv1.txt`.

Also, the paranoid in me would close all open streams in a finally block, but not super important in this code.