fix a speed issue w/ the zlib encoder and js interop

Fix a performance issue w/ zlib deflate (fixes https://github.com/dart-lang/spark/issues/295).

Essentially, the array we were deflating was not being converted to a JS array, but a proxy object. So each array access from JS required a JS <--> Dart round trip. Now we convert the array to a JS one before called deflate - the operation is ~60x faster.

@gaurave