Improve temporary file management in `gopherjs test`.
Improve temporary file management in `gopherjs test`.

  - Include Go package name in the temp file name.
  - Close file handle to the temp file early, since we are not actually
    using it.
  - Clean the temporary file up after test execution finished to reduce
    the clutter in the current directory.

I was also going to move temporary files into the OS's temp directory,
but it turns out using current directory is deliberate:
https://github.com/gopherjs/gopherjs/issues/303.

gopherjs/gopherjs,gopherjs/gopherjs,gopherjs/gopherjs,gopherjs/gopherjs,gopherjs/gopherjs