jinterface: fix finding cookie file on windows

Jinterface uses System.getProperty("user.home") to locate the user's home
and the cookie file. On Windows, the result might be different than the
value used by Erlang, which looks first to the HOMEDRIVE and HOMEPATH
variables.

The fix makes jinterface use the same logic.
jinterface: don't need another FilterOutputStream wrapper

DeflaterOutputStream is already an FilterOutputStream
jinterface: fix typo in error message if encoding fails
jinterface, OtpOutputStream: properly override the three write() methods to ensure our growth strategy

Previously, if code called e.g. write(byte[] b, int off, int len), the growth strategy of the parent class ByteArrayOutputStream was used.
jinterface: don't compress small erlang terms < 5 bytes

Compression always has at least 5 bytes (the compressed tag + original size) so we can't get a smaller external term if the original term is already smaller than 5 bytes.
jinterface: don't return compressed external term if bigger than uncompressed

Now, OtpOutputStream#write_compressed() uses the same mechanism as erts_term_to_binary() in external.c: it tries to compress the given term into a buffer of the size of the uncompressed term and if this is not possible, i.e. the compression plus headers is bigger, it uses the uncompressed external term format instead.
jinterface: new limited OutputStream implementation without the need to resize

(saves memory re-allocations)
jinterface: fix a memory leak

after the first try to compress the value with a fixed buffer size, the deflater must be closed so that memory can be (instantly) reused
jinterface, OtpOutputStream: add a write_compressed(object, level) method

Now that we use an own deflater, we can also allow the user to specify the compression level as in Erlang's term_to_binary/2.
float_to_list/2 changed rounding and cosmetic cleanup

Changed rouding to round half-way up instead of down.
Cosmetic cleanup and error handling of additional edge cases.
erts: Refactor mseg cache

Use double ended cache queues to evict oldest cache first
Test that list_dir("non-existing-dir") fails with the correct error
Tweak (make) silent rules support
Remove upgrade code not needed after application restart

Which will be the case with R16B in this case.
Simplify transport shutdown

Service process informs the watchdog process which informs the peer
process. (Instead of going directly to the latter in one case.)
Simplify watchdog transitions in service process

In particular, use watchdog messages as input and do away with the older
connection_up/down (and other) messages. Also, only maintain the
watchdog state, not the older up/down op state.
Add testcases to traffic suite

That check for unexpected entries in the request table.
Rename records peer/conn -> watchdog/peer in diameter_service

That is, make the naming match that of the corresponding modules.
This has long been fairly confusing.
Comment fixes
Fix faulty watchdog transition DOWN -> INITIAL

This was the result of the watchdog process exiting as a consequence of
peer death in some casesi, causing a restarted transport to enter
INITIAL when it should enter REOPEN. The watchdog now remains alive as
long as peer shutdown isn't requested and a 'close' message to the
service process (instead of watchdog death) generates 'closed' events
from the service.