Buffer: reject oversized QJS alloc() and concat() sizes
Buffer.alloc() and Buffer.concat() converted sizes with JS_ToUint32(),
which wraps values modulo 2^32: Buffer.alloc(2 ** 32 + 16) returned a
16-byte buffer. Use JS_ToIndex() instead, so these sizes throw a
RangeError.
In Buffer.concat(), the total length of the list could also overflow the
32-bit accumulator. Keep it in 64 bits and check it against
QJS_BUFFER_MAX_LENGTH. The overflow now throws a RangeError instead of a
TypeError, as in Node.js.