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.
Add extra valgrind suppression file for halfword emulator
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.
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.
OtpEpmd.lokupNames() may hang if network is badly configured

On some machines with weird network configurations,
InetAddress.getLocalHost() hangs. Searching for "localhost" works (at
least in the cases I met). The difference is that the loopback address
will be returned, instead of the real IP address, but for the local
machine this should not be a problem.
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.
mnesia: Use chained send_after instead of send_interval

timer:send_interval behaves badly when resuming from sleep on some
platforms. For example, if I sleep for 10 minutes, and have a
send_interval running once per minute, when I resume, 10 messages
will be sent immediately, eliminating the benefit of only running
the work periodically. This is admittedly a separate bug with
send_interval, but the workaround is straightforward, and also
protects from messages piling up in the queue when the work takes
longer than the interval.

This patch fixes piled up error reports on resume from sleep:

** WARNING ** Mnesia is overloaded: {dump_log, write_threshold}

You'll still be warned if mnesia is overloaded, just not repeatedly.

Additionally, erlang:send_after is more efficient than using the
timer module equivalent [1]

[1] http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id57251
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.
stdlib: Tweak ets_SUITE:heir to not exhaust memory

while trying to spawn a process with a specific pid
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
crypto: Make unloading of crypto safer

Facts:
crypto nif-lib registers callback functions that openssl uses
for memory management and thread synchronization. The callback
functions can only be set once, openssl does not allow changing the
callback functions.

Problem:
If openssl is dynamicly linked to crypto, you might get s scenario
where the crypto lib is unloaded while leaving openssl loaded
with its old pointers to the unloaded crypto code intact.
If crypto is then reloaded (by init:restart() for example), the crypto
nif-lib might get relocated at a different address. crypto calls
openssl which in turn calls the old invalid callback functions...kaboom.

Solution:
Break apart the callback functions into a separate dynamic lib that
crypto loads with dlopen. When crypto is unloaded the callback lib is
left in place to be reused if/when crypto is loaded again.
hipe: Cast offsetof to int in hipe_arch_print_pcb

* Silence compiler warning
* This is the same style as the rest of the debug printing in hipe.
  Keeping to the same style, though changing the printing format
  would probably be better. Not a critical change.
erts: Remove forgotten vxworks includes
erts: Fix '#ifdef' for unused static functions

On architectures where cpu topology was unavailable,
warnings erupted due to unused static functions.

Those warnings are now silenced.