Backport Fix #1236: Implement java.io.PrintWriter.

Backport: Move test: scala.scalajs.{testsuite => test}.javalib

(cherry picked from commit 19d0243d43cd25a876be5babedda9a425abce1e8)