Loosen the assumptions of code that handles escaping functions

The HiPE compiler implicitly relied on the assumption that a function
will never appear as both exported and also used as function closure.
This was true because the BEAM compiler prior to R16B created module
local anonymous functions for each closure. A proposed change to the
BEAM compiler invalidates this invariant, so in order to accommodate
for this change there needs to be a change of how the set of possibly
escaping functions is computed.

While doing this, the code was simplified by taking out a boolean()
tag that indicated whether a function is a closure or exported and
also slightly cleaned up the affected modules.
Added option wait_for_linebreak - so that expect does not need \n to match
stdlib: Remove obsolete testcase dets_SUITE:otp_9607
stdlib: Fix unstable testcase ets_SUITE:delete_large_named_table

Remove the call trace from this testcase as we cannot guarantee named
table to be gone until ets:delete returns anyway.
Don't lookup the node unless required in gen:call/{3,4}

Move some operations that aren't required for the happy path.
The operations were small, so they shouldn't show a big difference
in benchmarks except for systems with many active gen processes.
Use erlang:demonitor's flush option on timeout

It is equivalent to the few lines removed, except more efficient.
Merge branch 'ks/hipe-cleanup-escaping/OTP-11031' into maint

* ks/hipe-cleanup-escaping/OTP-11031:
  Loosen the assumptions of code that handles escaping functions
Merge branch 'maint'
Merge branch 'sverk/dets_remove_test_otp_9607' into maint

* sverk/dets_remove_test_otp_9607:
  stdlib: Fix unstable testcase ets_SUITE:delete_large_named_table
  stdlib: Remove obsolete testcase dets_SUITE:otp_9607
Merge branch 'fredrik/ct/telnet_wo_line_breaks/OTP-10085' into maint
Merge branch 'maint'
Merge branch 'lh/otp-optims/OTP-11035' into maint

* lh/otp-optims/OTP-11035:
  Use erlang:demonitor's flush option on timeout
  Don't lookup the node unless required in gen:call/{3,4}
Merge branch 'maint'