- add `memcpy_no_ub` that accepts null pointers for 0 count
- prevent 0 length allocation in `js_worker_postMessage`
- use safer test for `int` value in `JS_NewFloat64`,
`JS_ToArrayLengthFree` and `js_typed_array_indexOf`
If you want to extend a built-in class you need it's class ID and there
is no robust way to get that without this accessor.
* add JS_INVALID_CLASS_ID constant for invalid class ID.
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>