EEP 37: Funs with names

This adds optional names to fun expressions. A named fun expression
is parsed as a tuple `{named_fun,Loc,Name,Clauses}` in erl_parse.

If a fun expression has a name, it must be present and be the same in
every of its clauses. The function name shadows the environment of the
expression shadowing the environment and it is shadowed by the
environment of the clauses' arguments. An unused function name triggers
a warning unless it is prefixed by _, just as every variable.
Variable _ is allowed as a function name.

It is not an error to put a named function in a record field default
value.

When transforming to Core Erlang, the named fun Fun is changed into
the following expression:

    letrec 'Fun'/Arity =
               fun (Args) ->
                       let <Fun> = 'Fun'/Arity
                       in Case
    in 'Fun'/Arity

where Args is the list of arguments of 'Fun'/Arity and Case the
Core Erlang expression corresponding to the clauses of Fun.

This transformation allows us to entirely skip any k_var to k_local
transformation in the fun's clauses bodies.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Not currently on any branch.
# You are currently editing a commit during a rebase.
#
# Changes to be committed:
#   (use "git reset HEAD^1 <file>..." to unstage)
#
#	modified:   lib/compiler/src/sys_expand_pmod.erl
#	modified:   lib/compiler/src/sys_pre_expand.erl
#	modified:   lib/compiler/src/v3_core.erl
#	modified:   lib/stdlib/examples/erl_id_trans.erl
#	modified:   lib/stdlib/src/epp.erl
#	modified:   lib/stdlib/src/erl_expand_records.erl
#	modified:   lib/stdlib/src/erl_lint.erl
#	modified:   lib/stdlib/src/erl_parse.yrl
#	modified:   lib/stdlib/src/erl_pp.erl
#	modified:   lib/stdlib/src/ms_transform.erl
#	modified:   lib/stdlib/src/qlc_pt.erl
#	modified:   lib/syntax_tools/src/erl_syntax.erl
#	modified:   lib/tools/src/cover.erl
#	modified:   lib/tools/src/xref_reader.erl
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	.otp.plt
#	bench_map.E
#	bench_map.P
#	bench_map.S
#	bench_map.abstr
#	bench_map.erl
#	bench_map.kernel
#	bench_map.pp
#	blah.erl
#	fact.S
#	fact.dis
#	fact.erl
#	fact.kernel
#	fact.life
#	foo.erl
#	lib/appmon/otp-eep37/
#	lib/asn1/otp-eep37/
#	lib/common_test/otp-eep37/
#	lib/compiler/otp-eep37/
#	lib/compiler/test/inline_SUITE.S
#	lib/compiler/test/inline_SUITE.core
#	lib/debugger/otp-eep37/
#	lib/erl_interface/otp-eep37/
#	lib/gs/contribs/otp-eep37/
#	lib/gs/otp-eep37/
#	lib/ic/examples/otp-eep37/
#	lib/ic/java_src/com/ericsson/otp/otp-eep37/
#	lib/ic/otp-eep37/
#	lib/inets/examples/otp-eep37/
#	lib/inets/otp-eep37/
#	lib/inets/src/otp-eep37/
#	lib/jinterface/java_src/com/ericsson/otp/otp-eep37/
#	lib/kernel/otp-eep37/
#	lib/mnesia/otp-eep37/
#	lib/otp_mibs/otp-eep37/
#	lib/reltool/otp-eep37/
#	lib/runtime_tools/otp-eep37/
#	lib/sasl/otp-eep37/
#	lib/snmp/examples/otp-eep37/
#	lib/snmp/otp-eep37/
#	lib/snmp/priv/conf/otp-eep37/
#	lib/snmp/src/otp-eep37/
#	lib/stdlib/doc/src/erl_parse.erl
#	lib/stdlib/otp-eep37/
#	lib/stdlib/test/erl_lint_SUITE_priv/
#	lib/stdlib/test/erl_pp_test.E
#	lib/stdlib/test/erl_pp_test.erl
#	lib/test_server/otp-eep37/
#	lib/tools/otp-eep37/
#	lib/wx/examples/otp-eep37/
#	lib/wx/otp-eep37/
#	rcomp.S
#	rcomp.erl
Update primary bootstrap for named funs
Support named funs in the shell
Update primary bootstrap for named funs in the shell
Support named funs in the debugger interpreter
Test named funs
Document named fun expressions
Fix a bug in cover when used with no_auto_import

Cover was rewriting guard clauses as non-remote calls.
That said, if a guard contains erlang:is_binary(Binary),
Cover was incorrectly removing the erlang prefix which
lead to errors if is_binary is not auto imported.

This commit keeps the abstract format as it is.
Ensure cover keeps the proper file source

Whenever a module is compiled via compile:forms/2,
the source is set to current directory unless a source
option is passed to compile. This commit ensures that
cover passes the source information to compile:forms/2
to ensure the source won't be modified after the module
is cover compiled.
cover now relies on the compile info to find file sources

Prior to this commit, cover relied on a simple heuristic that
traverses directory from the beam file to find a source file.
The heuristic was maintained with this patch but, if it fails,
it fallbacks to the source value in the module compile info.

In order to illustrate how it works, one of the tests that
could not find its source now passes successfully (showing the
source lookup is more robust).
Fix various comment typos for R16
Fix various typos in HOWTO/ for R16
Fix various doc typos for R16
Break out the assert macros in eunit.hrl to stdlib/include/assert.hrl

Several people have requested that the assert macros in EUnit should be
moved out to a separate header file. This patch puts them in
stdlib/include/assert.hrl, which gets included by the eunit.hrl file. Thus,
nothing changes for eunit users, but the asserts can now also be included
separately.
Merge branch 'bd/odbc_extended_errors' into master-pu
Merge branch 'fm/posix-fallocate' into master-pu

Conflicts:
	erts/preloaded/ebin/erl_prim_loader.beam
	erts/preloaded/ebin/erlang.beam
	erts/preloaded/ebin/init.beam
	erts/preloaded/ebin/prim_inet.beam
Merge branch 'dg/win_icon' into master-pu
Merge branch 'dw/crypto-hmac-enhancements' into master-pu
Merge branch 'jwh/mnesia_interval_removal' into master-pu
Merge branch 'vd/code_get_mode' into master-pu