Rewrote with accumulators to trigger tco.

Re: https://github.com/purescript/purescript-arrays/pull/5#issuecomment-42902783