erts: Trapping memcpy in binary_to_term
erts: Fix crash when binary_to_term throws badarg

after it has built off_heap data
and then done at least one trap call.

The undo mechanism in dec_term does not work
if we build the magic binary after any other off_heap data.
erts: Fix bug in binary_to_term for compressed on halfword
erts: Improve stress of binary_to_term in binary_SUITE

by doing repeated calls with different reduction count.
erts: Let term_to_binary disable gc while trapping

as an attempt to improve performance
erts: Yield after trapping term_to_binary if gc has been ordered

or if "too much" offheap binaries has been built
erts: Adjust term_to_binary reduction factors

Made them powers of 2 for faster calculations.

500 encoded terms per reductions seemed a bit much, lowered to 32.

TERM_TO_BINARY_SIZE_FACTOR was not used in practice as it was only
applied to small binaries.

Lowered from 500kb to 256kb compressed bytes per trap call.
Fix DTrace build on Illumos

DTrace was recently patched in Illumos to fail to create an object
file if no probes are found.

* https://www.illumos.org/issues/4248
* https://github.com/illumos/illumos-gate/commit/54a20ab41aadcb81c53e72fc65886e964e9add59

This patch fixes two issues:

* Modify the configure script to pass an object file to `dtrace -G`
  that actually invokes a probe.

* Remove creation of `dtrace_user.o` from the dyntrace Makefile. In a
  previous commit [1] Scott Fritchie relocated all the user probes
  into the VM proper due to difficulties with DTrace probes in shared
  libraries. The `dtrace_user.d` file is now empty and generates a
  header file with nothing in it. There is no longer any reason to
  generate `dtrace_user.o` because all the probes are in the VM. Thus
  all the steps for building `dtrace_user.o` have been removed.

[1]: https://github.com/erlang/otp/commit/75552bd3bb4e7f3cf4dab81a5c81cf73b1d3fb99
Clean up some awkward wording around the +spp flag.

This issue was pointed out by lpgauth in #erlounge. While the intention is
clear, the original wording was a bit dodgy. I'm no grammarian--though I am a
native speaker--so it's quite possible the new wording I've introduced is not
impeachable. Should be idiomatic, though.

Signed-off-by: Brian L. Troutwine <brian.troutwine@adroll.com>
Prepare release
Update versions of OTP, erts, kernel, and stdlib

Update versions of OTP, erts, kernel, and stdlib to comply with
the new version scheme decided by the OTP technical board.
Merge tag 'OTP_R16B03'

The R16B03 release

Conflicts:
	lib/sasl/vsn.mk
fixed a spelling mistake in httpc doc
erts: Fix valgrind warning for re_SUITE:error_handling

by making sure we at least can read the first four bytes
of a compiled regexp where the 'magic_number' is located.
Support non top level letrecs in dialyzer

Dialyzer so far only supported letrecs at the top-level
and comprehension-like letrecs (i.e. that were directly applied)
in their body.

This commit address this issue by storing in the callgraph
bound letrec labels pointing to their functions. This information
is then used by the dataflow to properly lookup recursive
definitions.
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.
Update primary bootstrap for named funs
Merge branch 'sverk/trapping-bin2term' into OTP_R16B03

* sverk/trapping-bin2term:
  erts: Adjust term_to_binary reduction factors
  erts: Yield after trapping term_to_binary if gc has been ordered
  erts: Let term_to_binary disable gc while trapping
  erts: Improve stress of binary_to_term in binary_SUITE
  erts: Fix bug in binary_to_term for compressed on halfword
  erts: Fix crash when binary_to_term throws badarg
  erts: Trapping memcpy in binary_to_term
  erts: Cleanup code for trapping binary_to_term
  erts: Add erlang wrappers to binary_to_term
  trapping uncompress
  trapping size calculation
  trapping binary_to_term/2
  trapping STRING_EXT
  trapping lists and tuples
  trapping binary_to_term passing binary_SUITE
  Parallel check_process_code when code_server purge a module
  Functionality for disabling garbage collection
  Use asynchronous check_process_code in code_parallel_SUITE
  Execution of system tasks in context of another process

Conflicts:
	erts/emulator/beam/external.c
	erts/emulator/beam/sys.h
	erts/emulator/test/binary_SUITE.erl
	erts/preloaded/ebin/erlang.beam
	erts/preloaded/ebin/erts_internal.beam
Support named funs in the shell

The current code for the evaluation of ordinary funs is dependent
on the order on variables in the fun environment as returned by
erlang:fun_info(Fun, env).

To avoid the problem in the future, make sure that we only have one
free variable in the funs that we will need to inspect using
erlang:fun_info(Fun, env).
Update primary bootstrap for named funs in the shell