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.
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.
* Add AppRequest example with "CommandLine" custom command which provides
the C argv[].
* Add AppNotify example with "DebuggerHandleFile" custom notify when running
code from files.
* Set SIGPIPE handler to SIG_IGN when signal setup is enabled. This avoids
hard exits due to SIGPIPE when debugger transport connections break.
* Add --reattach option to allow the auto-reattach test to be done without
modifying duk_cmdline.c.
Add global bindings readFile() and writeFile() for easier testing
of JSON parsing etc. These are in no way official Duktape bindings,
just part of the 'duk' command (when enabled).
This is a useful example for users who want to implement the debug client
directly on the target, in which case the debug protocol is decoded on the
target instead of a remote client.