jaql: optimise operations by avoiding modifications to bats
jaql: optimise operations by avoiding modifications to bats

Instead of removing elements/rewriting arrays for original oid ranges,
just append new arrays with the items to use.  For this 0@0 no longer is
the start of the document, so make sure we pass that onto further pipe
operations.  Doing so, we avoid many expensive kdiff/sdiff operations,
by just appending some data to the existing BATs.
When we store in a variable, or print, we cleanup the whole structure
using a json.extract.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb