erts: Add configure test for IPV6_V6ONLY
test_server: Refactor run_test_case_msgloop()

Keeping all state as separate function arguments does not make it
easy to add more pieces of data to the state. Case in point is the
CurrConf argument where up to three separate items have been
shoehorned in.

Instead of the arguments, introduce a state record to hold all of the
different pieces of state (taking care to separate the former CurrConf
variable into separate fields in the record).

While at it, fix a bug. The name of the currently executing test
case (module and function) used to be stored in a tuple in the CurrConf
variable, and it would only be available after 'set_curr_conf' message
has been received. Depending on timing, it was possible in rare
circumstances for an EXIT signal to arrive before the 'set_curr_conf'
message. Avoid this problem by putting the current test case
name into the record from the beginning. That also means that we
can eliminate the workaround of getting the currently executing test case
from the stack trace using the get_mf/1.
Refactor the handling of the make_priv_dir message

The code is not actually shorter, but it avoids duplicating the code
for producing an error tuple when theres is no priv_dir tuple in
the config data.
test_server: Eliminate the Loc argument for do_end_tc_call()

The Loc argument was use to determine the name of the currently
executing test case, in case that the M and F arguments did not
specify a test case.

Since a previous commit makes sure that the M and F arguments *are*
valied, we can eliminate the Loc argument.
Keep the information about the current test case consistent

Three pieces of information could be out of sync in testcase
supervisor process at the time when a timetrap occurred:

* test_server_loc (process dictionary) - may indicate that a
  framework function is executing

* test_server_init_or_end_conf (process dictionary) - indicates whether
  init_per_testcase or end_per_testcase is executing

* The current configuration (#st.config) - set using a synchronous
  call

There could be in a crash in spawn_fw_call/7 because the current
configuration was not defined when it was expected to.

To avoid the problem, introduce set_tc_state/2 (and a corresponding
message) to allow setting both an indication what the testcase is
executing (e.g. init_per_testcase, framework call, and so on), and
the current configuration. Use only that information to handle
a timetrap timeout (and aborted testcase and the other reasons
for the testcase process to terminate). Completely remove
test_server_init_or_end_conf.
Simplify managment of test_server_loc

Before line numbers were included in exceptions (in R15), there were
parse transforms and macros that would keep the test_server_loc
process dictionary variable updated; therefore there is a mod_loc/1
function that will normalize the representation of locations.

Simplify the code as following:

* 'test_server_loc' should always contain a list with one or more
  tuples. ({M,F} or {M,F,Line})

* At the beginning of each test case, set 'test_server_loc' to
  [{Module,Func}] of the the currently executing test case.

* Stop updating 'test_server_loc', except when an exception occurs.
  (It used to be updated when running 'init_per_testcase' and so on.)

* Remove the mod_loc/1 function.
common_test: Enable running cover on common_test
[cover] Add support for test_server

OTP-10523

* Added cover:flush(Nodes), which will fetch data from remote nodes
  without stopping cover on those nodes.

* Added cover:get_main_node(), which returns the node name of the main
  node. This is used by test_server to avoid {error,not_main_node}
  when a slave starts another slave (e.g. in test_server's own tests).
[test_server] Don't stop cover after test is finished

This commit removes all calls to cover:stop from test_server. This is
to avoid crash in some processes due to old code.

The correction shall be further refined for general use. There will,
for instance, be an option to turn off cover:stop/0 after completed
test run, so the default behaviour is backwards compatible.
[common_test] Don't stop cover before stopping slave node

In order to avoid crash of processes that hold old code, cover is no
longer stopped before slave nodes are stopped. Instead cover:flush is
used which only fetches cover data from the slave.

This, along with similar changes in test_server allows all common_test
modules to be included in cover analysis.
[common_test] Start cover on slave nodes if running cover tests

Nodes started with ct_slave should automatically run cover when tests
are executed with cover analysis. Nodes must also be flushed for cover
data before stopped.
Skip epp_SUITE:otp_8911 if cover is running

This is because this test case itself starts and stops cover.
[test_server] Include all test_server modules in code coverage analysis
Include all stdlib modules in code coverage analysis
[test_server] Multiply timers with timetrap_scale_factor when starting nodes

In test_server_ctrl:start_node and wait_for_node, the timer in
controller_call was not multiplied by the timetrap_scale_factor. This
caused unexpected behaviour since the scale factor was used furhter
down the the code, and timeout would happen in unexpected order when
cover was running.
[test_server] Start cover in test_server:wait_for_node

Without this change, there is no support in test_server for starting
cover on a node started with option {wait,false}.
[test_server] Allow cross cover analysis when testing through common_test

The cross cover analysis functionality in test_server was broken since
OTP converted to running daily tests through common_test. This has
been corrected.
[common_test] Add option cover_stop

By default, test_server will always stop cover (and thus load back the
non cover compiled original beam files) after a test with code
coverage analysis is completed. The new option allows the common_test
user to specify that cover shall not be stopped. This can be useful if
there are processes still running old code, i.e. processes that have
not done any fully qualified function call after the cover
compilation, since loading the original code then will kill those
processes. This is only recommended if the erlang node is to be
stopped after the test run, or if cover can be manually stopped.
[common_test, test_server] Don't flush cover if cover is not running

ct_slave, ct_test_support and test_server_test_lib always called
cover:flush/1 when stopping slave nodes. If cover was not running,
this would cause cover_server to be started and thus
test_server:is_cover/0 to return true afterwards. This has been
corrected.
[common_test] Add test suite for code coverage support