lib: introduce `.setMaxSendFragment(size)`

fix #6889
test: ignore tests when built without OpenSSL CLI

fix #6880
test: refactor to use common testcfg
test: move debugger repl into own section
debug client: connect after child is ready

We now wait to connect to the debuggee until we know that
its error stream has data, to ensure that the output message
"connecting..... ok" appears after "Debugger listening on port xyz"

I also increased the test timeout to let the more complex
tests finish in time on Windows

This change fixes the following unit tests on Windows:
 test-debugger-repl.js test-debugger-repl-term.js test-debugger-repl-utf8.js
 test-debugger-repl-restart.js
test: debug-signal-cluster increase timeouts

The test needs a little more time to run so that it passes for all
builds (eg: Windows, debug)
test: relax timing in test-http-exit-delay

This test was originally intended to guard against regressions for
commit 16b59cbc74c8fe2f8b30f3af4c2f885b7bfb6030.

As such, it only needs to ensure that process exit has not been held up
by the date cache timer, which would fire on the next second.
crypto: remove most of the `node_isolate` uses

All C++ code should be using `args.GetIsolate()` or `env->isolate()`.
Using static `node_isolate` var limits possible future functionality
(like multi-isolate support).
async_wrap/timers: remove Add/RemoveAsyncListener

The ability to add/remove an AsyncListener to an object after its
creation was an artifact of trying to get AL working with the domain
module. Now that is no longer necessary and other features are going to
be implemented that would be affected by this functionality. So the code
will be removed for now to simplify the implementation process.

In the future this code will likely be reintroduced, but after some
other more important matters have been addressed.

None of this functionality was documented, as is was meant specifically
for domain specific implementation work arounds.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
node: ensure same AL inst only runs once

It was possible that the same AL instance was run twice if it were both
attached to the currentContext then again added to the new asyncQueue
generated for the new stack.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
node: compare AsyncListener instances, not uid's

Now that process.createAsyncListener() returns a unique object instance
it is no longer necessary to compare the uid's of the objects.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
test: give test-net-GH-5504 more time to run

On Windows debug builds, the test was failing because the timeout
was too short.
text: give more time to test-next-tick-error-spin

The previous timeout was too short for certain execution conditions
(Windows, debug build, first execution).
addons: build and test examples

fix #6910
node: `EmitExit` should not call `exit()`

Before this commit `RunAtExit` and `env->Dispose()` were never reached,
because `EmitExit` was always colling `exit`.
crypto: throw only in direct C++ methods

Do not throw in internal C++ methods, that clobbers logic and may lead
to the situations, where both exception was thrown and the value was
returned (via `args.GetReturnValue().Set()`). That doesn't play nicely
with v8.

fix #6912
crypto: add newline to cert and key if not present

After one of OpenSSL updates we have stopped accepting PEM private keys
and certificates that doesn't end with a newline (`\n`) character.
Handle this regression in `crypto.js` to make less trouble to our users.

fix #6892
path: improve POSIX path.join() performance

Performance gains are ~4x (~1.5us), but still much slower than a naive
approach. There is some duplicate work done between join(), normalize()
and normalizeArray() so additional optimizations are possible.

Note that this only improves the POSIX implementation.

Thanks to @isaacs and @othiym23 for helping with this optimization.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
node: only run same AL once on error

Should have been included with 60fcc11 as it is the same type of fix.

Signed-off-by: Forrest L Norvell <ogd@aoaioxxysz.net>
node: remove asyncStack

Now that the context stores the active execution stack, and because
removeAsyncListener() always removed the AsyncListener from the queue
and the stack, there's no need to keep a stack around anymore. Instead
the active asyncQueue and the currentContext is able to handle it all.

Signed-off-by: Forrest L Norvell <ogd@aoaioxxysz.net>