JavaDoc the formPassword mechanism:
- Explain what it is for (anti-CSRF token). Thanks to nextgens!
- Link related functions/variables in each of their JavaDoc
- Stress how important it is.
Refactor: Use OpennetPeerNode instead of PeerNode in OpennetManager.
Add constant to define of long distance links, add isLongDistance() to OpennetPeerNode.
On startup, drop any opennet peers we don't have a location for. This is essential for the next step, but is defensible anyway: they haven't connected so they probably won't connect.
Calculate the number of short links vs long links to aim for.
Split the opennet peers list into long distance peers and short distance peers. LRU operates separately for each. This commit should be fairly mechanistic. See below for more details and attribution. (Doesn't build)

This should fix our link length distribution problems; basically we've had too few short links and too many long links, probably because of path folding on requests for data cached nearby. The result of that appears to have been that routing doesn't work - requests get close via FOAF and then bounce around randomly, and so our closest-approach-distance (on a 5000+ node network) was much too large. We have discussed the poor link length distribution (from probe requests) for some time, but the paper "Measuring Freenet in the Wild: Censorship-resilience under Observation" clarified the situation and gave the impetus for this fix. This is now however exactly their preferred solution, as we are only using 2 "bins"...
Fix wantPeer() interface, explain some complications and add a FIXME to be looked into eventually.
Fix and explain dropExcessPeers() call in PeerNode.
Refactor opennet-specific logic into OpennetManager.onConnectedPeer
Fix plurals and typo
Get rid of repeated condition, add lruQueue(bool) and lruQueue(OpennetPeerNode)
Explain the parameters. Thanks ArneBab.
Add and use dropAllExcessPeers()
Change boolean longDistance to an enum for the distance class of a peer.
Improve comment.
Fix using wrong limit -> always added peer! Thanks ArneBab. This supercedes the other branch...
Use braces as per convention.
Explain nodeToAddNow == null
Enum members are CONSTANTS, but enum names are CamelCase like other classes. LINK_LENGTH -> LinkLengthClass. Thanks operhiem1.
Merge remote-tracking branch 'toad/split-opennet-routing-table-clean' into next