[reltool] Allow incl_cond=derived on module level

According to documentation it should be allowed to set
incl_cond=include|exclude|derived, but if set to derived on module
level, reltool_server would crash. This has been corrected.
Fix filelib:wildcard/2

filelib:wildcard("some/relative/path/*.beam", Path) would fail to
match any file. That is, filelib:wildcard/2 would not work if the
first component of the pattern did not contain any wildcard
characters.

Noticed-by: Samuel Rivas
[reltool] Make reltool:install/2 work on windows

The erl.ini file generated by reltool:install/2 faulty pointed out
$ROOT/bin as Bindir. This is now changed to $ROOT/erts-Vsn/bin. Also,
backslashes in erl.ini needed to be escaped.
[reltool] Automatically add included applications in rel file

If a 'rel' spec in the reltool config does not contain all
applications that are listed as {applications,Applications} in a .app
file, then these applications are autmatically added when creating the
.rel file.

For 'included_applications', the behaviour was not the same. I.e. if a
'rel' spec in the reltool config did not contain all applications that
are listed as {included_applications,InclApplications} in a .app file,
then reltool would fail with reason "Undefined applications" when
creating the .rel file. This has been corrected, so both
'applications' and 'included_applications' are now automatically added
if not already in the 'rel' spec.

I.e. for an application 'z', if z.app contains
{applications,[stdlib,kernel,x]}
{included_applications,[y]}

then reltool configuration

    {rel, "myrel", "1.0", [z]}

will cause the same .rel file as

    {rel, "myrel", "1.0", [stdlib,kernel,x,y,z]}
Merge branch 'bjorn/stdlib/filelib-wildcard/OTP-6874'

* bjorn/stdlib/filelib-wildcard/OTP-6874:
  Fix filelib:wildcard/2
Allow ** in filelib:wildcard

Two adjacent * used as a single pattern will match
all files and zero or more directories and subdirectories.
[reltool] Keep order from rel spec when sorting used and included applications

The rel specification now dictates the order in which included and
used applications are loaded/started by the boot file. If the
applications are not specified in the rel spec, then the order from
the .app file is used. This was a bug earlier reported on systools,
and is now also implemented in reltool.

Example:

If a .app file specified

{applications,[x,y]}
{included_applications,[b,c]}

And the reltool.config has

{rel, "myrel", "1.0", [a,y,x,c,b]}

Then the boot file will load/start y before x and c before b. Earlier
x would always be started before y and b always before c due to the
order in the .app file.
global: Allow "tuple funs" as resolve functions

Commit de7e01c958ff7c9e6da4034a53567a30a4ae5792 removed support for
tuple funs. To still allow resolve functions for
global:{re_}register_name/3 to be specified as {M,F}, we'll need to
translate {M,F} to an external fun.

Also update the documentation to mention that the use of {M,F} to
specify a resolve function is deprecated, and to add a recommendation
to use an external fun.
test_server_ctrl: Don't die in stop_extra_tools/1

If it is not possible for test_server_ctrl:start_log_file/0 to
create the log file directory or log files, then stop_extra_tools/1
(called from init_tester/10) is also likely to crash and hide the
original error reason. That will be confusing to the user.

Therefore, catch the call to stop_extra_tools/1.
test_server_ctrl: Present "cannot create log dir" errors more neatly
Teach test_server to report severe errors to common_test

If a severe error occurs in test_server (e.g. failing to write to
log files), test_server would terminate without commont_test knowing
about it. Since ct_run can now return an exit code, it is important
that common_test is aware of severe problem so that it can indicate
that an error has occurred.
Merge branch 'bjorn/kernel/global-resolve-function-fix/OTP-10419'

* bjorn/kernel/global-resolve-function-fix/OTP-10419:
  global: Allow "tuple funs" as resolve functions
ignore calls to gs* modules if it is not built
Merge branch 'henrik/undef-fix/OTP-10428'

* henrik/undef-fix/OTP-10428:
  ignore calls to gs* modules if it is not built
ts_run: Make errors from ct:run_test/1 visible

The ts wrapper module invokes common_test by calling the
ct:run_test/1 function using "erl -eval Cmd". Since
ct:run_test/1 is intended to by called from the Erlang shell,
it returns error values rather than printing them. Therefore,
when an error occurs, users of ts may not see any error
indication.

Introduce the ts_run:ct_run_test/2 wrapper which invokes
ct:run_test/1 and prints out any error that occurs.
ts: Remove the unused module ts_selftest
ts: Remove the obsolete ts:index/0 command

The ts:index/0 command only works with test_server log directories.
The functionality to generate an overview of all tests run is now
provided by common_test itself.
ts: Remove the non-working ts:clean/0,1 commands

The commands no longer work now that ts is a wrapper for
common_test (instead of for test_server), and no one seems to
have missed them.
Merge branch 'bjorn/ts-fixes'

* bjorn/ts-fixes:
  ts: Remove the non-working ts:clean/0,1 commands
  ts: Remove the obsolete ts:index/0 command
  ts: Remove the unused module ts_selftest
  ts_run: Make errors from ct:run_test/1 visible
Merge branch 'jv/filelib_recursion_wildcard'

* jv/filelib_recursion_wildcard:
  Allow ** in filelib:wildcard

OTP-10431