opennet: increase maxpeers to 140

Document the considerations for choosing max peers and increase
the max peers to 140 and the panic limit to 150 to take the
current gap between slow and fast connections into
account. Currently about 20% of our users max out the 100 peers
limit.

--HG--
extra : amend_source : ed3b947966c6da40791630e2fc144e62934e5767
opennet manager: clearer comment

Replaced the imagined distance level by the simple hop. The imagined
distance level referred to a simplistic network model with several
stages of link lengths instead of the more organic link building
freenet uses. It did not help understanding.

--HG--
extra : source : 8bc2ae5b4a00dc3bd98efaef28bdf45b9c5e7de9
opennet manager: derive max peers.

Use existing constants for the long/short peers split.
opennet manager: cleaner.

Use a temporary SHORT_NODES_FRACTION variable to make the code easier
to understand.
Merge remote-tracking branch 'ArneBab/more-maxpeers' into next
Fix whitespace and line length; reword comments

Numbers in comments like this can easily become outdated. Some lines had
trailing whitespace, or were formatted as though the maximum line length
is shorter than 100 characters.
opennet: replace improperly-truncated constant

Truncating to an integer is not desirable for this proportion.

This constant is inverse, then only multiplied by. Putting the short
proportion next to the long makes it easier to keep up to date, and not
having it inverse makes it clearer what's happening.
Fix clobbering old logs on startup

findOldLogFiles would modify the calendar passed in by places like
FileLoggerHook's WriterThread.run().
Simplify
Remove needless cast

wait() takes longs.
Fix exception on illegal SSK key.

Illegal insert keys
SSK@AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,AQECAAE/foo
(x < 1) or
SSK@sUM2irzVH1jWRA1UFzmTOaTRW~8Jaixdjm30T1LW03k,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,AQECAAE/foo
(x >= q)
throws unexpected exception:

java.lang.IllegalArgumentException
at freenet.crypt.DSAPrivateKey.<init>(DSAPrivateKey.java:28)
at freenet.keys.InsertableClientSSK.create(InsertableClientSSK.java:5)
at freenet.keys.FreenetURI.deriveRequestURIFromInsertURI(FreenetURI.java:1249)
at freenet.node.fcp.ClientPutBase.<init>(ClientPutBase.java:110)
[...]

Re-throw expected exception instead.

Signed-off-by: David ‘Bombe’ Roden <bombe@pterodactylus.net>
Merge branch 'fix-exception-on-illegal-ssk-keys' into next
Merge branch 'next' of https://github.com/freenet/fred into next