fix reading compressed binary terms from Java

Larger compressed binary could not be decoded inside JInterface.

- applied a patch posted on erlang-questins in September 2009
  http://erlang.org/pipermail/erlang-patches/2009-September/000478.html
-> extended this patch as it alone was not enough to fix the bug

Problem was that when reading from an InputStream, you can only specify a maximum number of bytes to read. Java doesn't quarantee that it actually reads this many bytes - it could be less!
This patch now reads up until the expected size bytes. If there are more than expected, the actual number of available bytes is not printed (we probably shouldn't read the additional bytes, security-wise - the erlang external byte representation is broken in this case though).
add (de)compress roundtrip tests with larger values
Fix bug when making nsis target
Fix printing the empty binary at depth 1 with ~W

A case clause ordering problem is causing the empty binary to be
printed as <<...>> rather than the correct <<>> when using ~W with a
depth of 1. Add new tests to verify correct behaviour.
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.
Remove unused files from old native dns resolver
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.
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
Fix release_handler:find_script so it can read regexp in appups
inets: Remove dbg tracing from testcases
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.
Have supervisor send errors up the chain

If a child fails to start, supervisor relies upon error_logger which does not
work when IO is inhibited. Instead pass the error up the chain and let someone
else use a proper Reason for any possible printouts.
stdlib: Tweak ets_SUITE:heir to not exhaust memory

while trying to spawn a process with a specific pid
SCTP test case with socket active options once and true

Test case for testing socket option {active, true} after
association is peeled off.