Improve ENOMEM handling

Testing remains to be done.  We could have a malloc interposer with
fault injection options, but it'd be even better to use an off-the-shelf
one.  We'd still need to setjmp() in jq_test.c and longjmp() out of the
handler on [fault-injected] ENOMEM.

Also, note that handling ENOMEM this way means leaking memory every time
ENOMEM happens, even if the system later recovers.  Maybe we should
instead check for errors at jv_mem_alloc() call sites and have a special
sentinel jv value for indicating ENOMEM, then check for this at *every*
jv_*() call site.  Hmmm.