Have lib/raczlib use lib/cgozlib

As the cmd/ractool comment changes say, this is almost a 2x speed-up for
RAC+Zlib decoding on the enwik8 test file, comparable to the cgozlib
benchmark numbers:

$ go test -test.bench=. github.com/google/wuffs/lib/cgozlib
goos: linux
goarch: amd64
pkg: github.com/google/wuffs/lib/cgozlib
BenchmarkCgo-56     	    2514	    477230 ns/op
BenchmarkPure-56    	    1090	   1080853 ns/op
diff --git a/cmd/ractool/data.go b/cmd/ractool/data.go
index 5cfedb6..bf2eb76 100644
--- a/cmd/ractool/data.go
+++ b/cmd/ractool/data.go
@@ -156,9 +156,9 @@
     sys     0m0.118s
     $ time ractool -decode -drange=50000000..50000008 shared.rac
     Business
-    real    0m0.003s
-    user    0m0.004s
-    sys     0m0.000s
+    real    0m0.006s
+    user    0m0.003s
+    sys     0m0.003s
 
     $ # A RAC file's chunks can be decoded in parallel, unlike ZIP,
     $ # substantially reducing the real (wall clock) time taken even
@@ -168,12 +168,12 @@
     user    0m0.713s
     sys     0m0.025s
     $ time ractool -decode -singlethreaded shared.rac > /dev/null
-    real    0m0.959s
-    user    0m0.920s
-    sys     0m0.044s
+    real    0m0.523s
+    user    0m0.508s
+    sys     0m0.028s
     $ time ractool -decode                 shared.rac > /dev/null
-    real    0m0.095s
-    user    0m1.316s
-    sys     0m0.069s
+    real    0m0.052s
+    user    0m0.657s
+    sys     0m0.049s
     --------
 `
diff --git a/cmd/ractool/main.go b/cmd/ractool/main.go
index 0c33780..b5daf0d 100644
--- a/cmd/ractool/main.go
+++ b/cmd/ractool/main.go
@@ -157,9 +157,9 @@
     sys     0m0.118s
     $ time ractool -decode -drange=50000000..50000008 shared.rac
     Business
-    real    0m0.003s
-    user    0m0.004s
-    sys     0m0.000s
+    real    0m0.006s
+    user    0m0.003s
+    sys     0m0.003s
 
     $ # A RAC file's chunks can be decoded in parallel, unlike ZIP,
     $ # substantially reducing the real (wall clock) time taken even
@@ -169,13 +169,13 @@
     user    0m0.713s
     sys     0m0.025s
     $ time ractool -decode -singlethreaded shared.rac > /dev/null
-    real    0m0.959s
-    user    0m0.920s
-    sys     0m0.044s
+    real    0m0.523s
+    user    0m0.508s
+    sys     0m0.028s
     $ time ractool -decode                 shared.rac > /dev/null
-    real    0m0.095s
-    user    0m1.316s
-    sys     0m0.069s
+    real    0m0.052s
+    user    0m0.657s
+    sys     0m0.049s
     --------
 */
 package main
diff --git a/lib/raczlib/make_cgo.go b/lib/raczlib/make_cgo.go
new file mode 100644
index 0000000..0b56888
--- /dev/null
+++ b/lib/raczlib/make_cgo.go
@@ -0,0 +1,33 @@
+// Copyright 2019 The Wuffs Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package raczlib
+
+import (
+	"io"
+
+	"github.com/google/wuffs/lib/cgozlib"
+	"github.com/google/wuffs/lib/rac"
+)
+
+// MakeDecompressor implements rac.CodecReader.
+func (r *CodecReader) MakeDecompressor(compressed io.Reader, rctx rac.ReaderContext) (io.Reader, error) {
+	if r.cachedZlibReader == nil {
+		r.cachedZlibReader = &cgozlib.Reader{}
+	}
+	if err := r.cachedZlibReader.Reset(compressed, rctx.Secondary); err != nil {
+		return nil, err
+	}
+	return r.cachedZlibReader, nil
+}
diff --git a/lib/raczlib/make_notcgo.go b/lib/raczlib/make_notcgo.go
new file mode 100644
index 0000000..cdfddac
--- /dev/null
+++ b/lib/raczlib/make_notcgo.go
@@ -0,0 +1,41 @@
+// Copyright 2019 The Wuffs Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !cgo
+
+package raczlib
+
+import (
+	"compress/zlib"
+	"io"
+
+	"github.com/google/wuffs/lib/rac"
+)
+
+// MakeDecompressor implements rac.CodecReader.
+func (r *CodecReader) MakeDecompressor(compressed io.Reader, rctx rac.ReaderContext) (io.Reader, error) {
+	if r.cachedZlibReader != nil {
+		if err := r.cachedZlibReader.Reset(compressed, rctx.Secondary); err != nil {
+			return nil, err
+		}
+		return r.cachedZlibReader, nil
+	}
+
+	zlibReader, err := zlib.NewReaderDict(compressed, rctx.Secondary)
+	if err != nil {
+		return nil, err
+	}
+	r.cachedZlibReader = zlibReader.(resetReadCloser)
+	return zlibReader, nil
+}
diff --git a/lib/raczlib/raczlib.go b/lib/raczlib/raczlib.go
index a47874f..0e0e24e 100644
--- a/lib/raczlib/raczlib.go
+++ b/lib/raczlib/raczlib.go
@@ -54,11 +54,22 @@
 	return b
 }
 
+type resetReadCloser interface {
+	// Reset is the zlib.Resetter interface's sole method.
+	//
+	// We explicitly spell out the method signature, instead of just saying
+	// "zlib.Resetter". It may be possible for a future version of this package
+	// to not depend on the standard library's "compress/zlib" package at all.
+	Reset(r io.Reader, dict []byte) error
+
+	io.ReadCloser
+}
+
 // CodecReader specializes a rac.Reader to decode Zlib-compressed chunks.
 type CodecReader struct {
 	// cachedZlibReader lets us re-use the memory allocated for a zlib reader,
 	// when decompressing multiple chunks.
-	cachedZlibReader zlib.Resetter
+	cachedZlibReader resetReadCloser
 
 	// These fields contain the most recently used shared dictionary.
 	cachedDictionary       []byte
@@ -78,25 +89,6 @@
 	return &CodecReader{}
 }
 
-// MakeDecompressor implements rac.CodecReader.
-func (r *CodecReader) MakeDecompressor(
-	compressed io.Reader, rctx rac.ReaderContext) (io.Reader, error) {
-
-	if r.cachedZlibReader != nil {
-		if err := r.cachedZlibReader.Reset(compressed, rctx.Secondary); err != nil {
-			return nil, err
-		}
-		return r.cachedZlibReader.(io.Reader), nil
-	}
-
-	zlibReader, err := zlib.NewReaderDict(compressed, rctx.Secondary)
-	if err != nil {
-		return nil, err
-	}
-	r.cachedZlibReader = zlibReader.(zlib.Resetter)
-	return zlibReader, nil
-}
-
 // MakeReaderContext implements rac.CodecReader.
 func (r *CodecReader) MakeReaderContext(rs io.ReadSeeker, chunk rac.Chunk) (rac.ReaderContext, error) {
 	// For a description of the RAC+Zlib secondary-data format, see