On FreeBSD arpa/inet.h doesn't provide sockaddr_in, which is provided by
netinet/in.h. Since netinet/in.h is POSIX and arpa/inet.h is SUSv2, and
Duktape only needs defines from netinet/in.h, switch to using that header.
The precalculated value has a built-in offset for DUK_BC_REGLIMIT so that
DUK__REGCONST(P) doesn't have to explicitly subtract. Also rework the
DUK__REGCONST an DUK__REGCONSTP macros for smaller footprint.
Scanbuild fixes:
* duk_cmdline.c realloc() failure could leak memory, fixed.
* Other fixed scanbuild errors were harmless.
* Remaining errors are invalid memory access in panic (intentional
segfault) and a Date handling case where garbage data is intentionally
assigned as doing so is harmless and intended.
Avoid unnecessary index re-check in num coercion.
* Fix temporary directory prefix.
* Add test run for Google V8 benchmark; while it's pointless for performance
measurement when the test runs in the cloud, it still provides a useful
regression harness.
* Add qecmatest and apitest assert and valgrind variants.
* Add valgrind massif test jobs to get approximate peak memory usage for a
'Hello world' test (involving startup RAM usage + minimal compilation
memory usage).
* Add Minisphere and DukLuv as initial examples of third party builds as
regression tests.
* Fix apitest executor, other minor fixes.
* Use shared error macros and shared error handler to reduce the size of call
sites of common errors.
* Make zero argument DUK_ERROR() calls non-vararg calls to reduce call site
footprint. Non-vararg calls have smaller call sites and because there are
a lot of call sites, this turns out to be significant.
* Remove variadic macros from internal DUK_ERROR() macro set and add separate
macros for argument counts 0 to 4; this is more portable and requires less
conditional code, and works well when a non-vararg call is used for most
error call sites.
* Rework macro / function argument order for the error path, try to keep 'thr'
in the same argument slot to avoid unnecessary register moves.
* Pack linenumber and error code into a single 32-bit argument when possible,
removes one more constant load from the call site.
* Convert some internal errors to RangeErrors when the underlying cause is an
implementation limit (such as a compiler temp limit) rather than an actual
unexpected internal situation.
* Simplify and share a few error messages to reduce string count.
* Command renames
* Clarify Proxy handling
* Clarify handling of Array gaps and sparse Arrays
* Clarify handling of crossed indices for GetObjPropDescRange