Merge remote branch 'operhiem1/rememberDir' into next
Use Listener when relaying non-local results.

This allows consolidation of sending code, argument cleanup, and because
messages are recreated (for now only when relaying results back, not
forwarding requests) any unexpected fields or sub-messages will not be
included, making attacks based on including large amounts of unexpected
information in messages ineffective.
Don't increment counter when there are no free slots.
Take local references of peer arrays.

This includes using connectedPeers instead of myPeers, (the latter
includes peers that are not connected but are desired) and avoids using
unchecked exceptions for control flow around the peer array.
Explicit null check in request() and ResultRelay.

Avoids null checks further along the line and results in cleaner
handling of a null source.
Check for changes in connected peers.

connectedPeers should not be null as it is not set to null anywhere: either
an ArrayList toArray() or a zero-length array.
Document enum valueOf(code); declare throws.
Don't catch NPE on forwarding send.
Schedule decrement outside synchronize{}.
Check that peer is connected before relaying.
Whitespace.
Documentation: UNKNOWN error can now propagate.
Rebuild request before forwarding.
Make myPeers and connectedPeers private and provide synchronized getters (package-local). Use them.
Trivial code tidyup
Merge branch 'next' of git://github.com/freenet/fred-staging into newProbesRebase
Merge remote branch 'operhiem1/frenchTranslation' into next
Substantial (but partial) Japanese update, thanks!
Revert "Tweak peers limit by bandwidth SCALING_CONSTANT: Lots of peers are on the high end of the peers limit. Reduce the multiplier, so it takes more bandwidth to have 40 peers; this should improve the average bandwidth per connection."

This reverts commit cb21f7d4bc5e1940b6acdb49004b912f8fb705e5.

There seems to be a consensus that this has reduced performance, including from evanbd, who suggested it in the first place. The objective numbers are rather unclear mind you.
Use sychronized getter for connectedPeers.

Hopefully avoids concurrency issues with reading it.