CLJS-849: fix iteration bound in pack-array-node
sync up ClojureScript transducers with Clojure

See https://github.com/clojure/clojure/commit/7d84a9f6f35a503cddf98487b6544d18937c669e
CLJS-852: Faster group-by

Copy over the Clojure implementation which uses transients.