chk: newlines on string mismatch
sqlite3ext: pointer fixes
added a general purpose quicksort for arrays
kvm: actually use a weak ref
stacks: fill popped cells with default value for the type.

This FINALLY fixed the memory leak for subterms in kvm.