Exit peer_fsm with {shutdown, watchdog_timeout}, not shutdown

This was a remnant of the time when sasl interpreted everything but
shutdown or normal as a crash.
Fix handling of Origin-State-Id config

Documentation (correctly) say {'Origin-State-Id', Unsigned32()},
code (incorrectly) expected {'Origin-State-Id', [Unsigned32()]}.
Fix matching in case of erroneous capabilities config

{invalid, K, V} was never matched. Return full reason, not just an
atom.
Make cerl -valgrind work with quoted spaces in command line
Send up event *after* inserting peer in table

Otherwise a request in response to an event can return error due to the
peer not yet having been inserted.
Verify that ebin folder of applications exists

Sometime in cross environments the documentation will
create the lib folders, but there will be no ebin so
all undefined functions should then be ignored.
Add missing clause for peer failover

diameter_codec:sequence_numbers/1 is called on an already extracted pair
of sequence numbers in the case of failover.
Don't call service process for service_info

So that the function is usable when we're already in the service
process. For example, in peer_up/peer_down callbacks.
Add eval_packet for examining outgoing messages after encode

Both prepare_request/prepare_retransmit and handle_request can
return {eval_packet, RC, PostF} where PostF will be evaluated on any
encoded packet before transmission.
Document eval_packet
Improve other diameter_app doc
Use packet callbacks in traffic suite
Use reduction limit in order to determine when to do wakeup
erts: Add configure test for IPV6_V6ONLY
beam_makeops: Eliminate a deprecation warning

Perl 5.16.1 (and perhaps other versions) issues the following
warning:

  defined(@array) is deprecated at utils/beam_makeops line 1714.
        (Maybe you should just omit the defined()?)

for the following line:

$prev_last = pop(@{$gen_transform{$key}})
	if defined @{$gen_transform{$key}};   # LINE 1714

The documentation for "defined" says that its use on hashes and
arrays is deprecated and that it may stop working in a future
release.

Simply removing "defined" (as suggested by the warning message)
will not work, as there will be an error when trying to use an
undefined value as an array reference:

  Can't use an undefined value as an ARRAY reference at
  utils/beam_makeops line 1714.

What we must do is to check whether $gen_transform{$key} is
defined before trying to use it as an array reference.

Noticed-by: Tuncer Ayaz
erts, heart: Ensure erl_crash.dump is written

When a crash dump is about to be written and we have
heartbeat enabled on a system. We need time to write it
before heart explicitly kills the beam.
heart: Refactor heart debugging
erts: Search for heart in ports that are alive
test: Refactor away ?line macros in heart_SUITE
erts: Change ERL_CRASH_DUMP_SECONDS behaviour

Not setting ERL_CRASH_DUMP_SECONDS will now terminate beam
immediately on a crash without writing a crash dump file.

Setting ERL_CRASH_DUMP_SECONDS to 0 will also terminate beam
immediately on a crash without writing a crash dump file, i.e. same as not
setting ERL_CRASH_DUMP_SECONDS environment variable.

Setting ERL_CRASH_DUMP_SECONDS to a negative value will let the beam wait
indefinitely on the crash dump file being written.

Setting ERL_CRASH_DUMP_SECONDS to a positive value will let the beam wait
that many seconds on the crash dump file being written.

A positive value will set both an alarm in beam AND a heart timeout for restart
if heart is running.

This is due to the change of 'heart' behavior when 'heart' is
listening for a crash.