Include apps needed for tests and doc in small build

Included 'inets' in small build, making it possible to run test
using only a small build.

Included 'erl_docgen', 'xmerl', and 'edoc' in small build, making
it possible to build documentation using only a small build.
Fix port exit
Fix unsafe driver_select() from win32 vanilla/spawn drivers
Fix unsafe accesses to driver data from win32 fd/vanilla/spawn drivers
Fix flush of fd-driver on Windows
Fix erts-5.10 release notes
Fix type of error Reason on gen_tcp:send/2

When the TCP socket is in passive mode, it is possible that a close
message has not been delivered to the controlling process before
calling send/2. This results in the returning {error, closed} to the
caller, in the same way that recv/2,3 does. This commit adjusts the
type of the error "Reason" to include the atom 'closed'.
c: Remove handling of binaries in return from file:list_dir/1

file:list_dir/1 will no longer return binaries.
ssl: Generalize cb_info option
edoc: Fix building of documentation in sub directories

8115c0840527 broke building for projects that used sub directories
(but not packages).
Make the file:filename() type more restrictive

The recommended type for filenames is a list of characters (which
may be Unicode characters greater than 255). Change the
file:filename() to reflect that.

For the filename module we still need a type that can be either
a string or a binary, so we need to introduce the type
file:filename_all().
Strengthen test suite
Don't handle binaries from file:list_dir/1

In R16B, file:list_dir/1 will never return binaries.
Don't allow binaries as the Cwd argument for filelib:wildcard()

filelib:wildcard() will no longer support "raw filenames", so it
makes no sense for it to accept a binary Cwd argument.
[kernel] FIx a bug that could cause crash with wrong reason
Don't redefine error/1

It is confusing. Rename our own exception-generating function to
badpattern/1.
Rethink the filelib:wildcard() functions

Commit 70b5e24c9498225fadc08d19503269c8aad851bf broke
filelib:wildcard(Pattern, ".").

Over the years, the logic for filelib:wilcard() has become a mess
of special cases.

Probably because of premature optimization, filelib:wildcard(Pattern)
and filelib:wildcard(Pattern, Cwd) are handled differently.
They can be consolidated if we use a "." as the default Cwd argument.

We can also simplify things by compiling the Cwd argument into the
wildcard. We did not that in the initial implementation because it
used to be possible to pre-compile a wildcard and pass it to
filelib:wildcard/{1,2}. Since that is no longer possible, there is
no point in keeping the compiled wildcard "portable" (not dependent
on the Cwd argument).
Replace filename:join/2 with '++'

Under controlled circumstances (and we are in control of the
circumstances), filename:join/2 can be replaced with '++'.

'++' is faster because it is implmented in C, does not need to
look at the list elements it copies, and does not need to copy
its right operand.
Only sort the result list once, just before returning

There does not seem to be any advantage of sorting the result of
file:list_dir/1 directly. Disadvantages are that we'll need to be
careful to keep the result sorted, and that we could waste time
sorting filenames that the pattern matching will discard anyway.
Clean up and simplify the inner matching loop

Use list comprehensions and 'orelse' to make the code more concise.

Rename wildcard_5/2 to match_part/2 to make it clearer what it does.

If the pattern always matches, don't test it in every iteration of
the loop.