Fix several bugs in inflate and inflate_fast.
Simplified buffer index handling.
Added some trace statements to both C and Rust.