Use a closure for tdefl high-level api as well
Change c_ints and mz_uints to uints for some of tdefl

Also use iterators for memsetting, use legal pointer offsetting syntax,
and other small fixes.