Remove dynamic allocations from filter loop

Restructure the main filter loop so that ffi pointer values are not live at
control flow boundaries - that is, so they are confined to one trace.  This
allows luajit to sink (optimize out) the dynamic allocations. The result is
that all CNEWI calls are sunk, and a considerable performance improvement on
some workloads.

https://github.com/Igalia/pflua/issues/57
Let's refactor this to pass in "max_offset" rather than ptr_end; wdyt?