Centralise memory limit detection hacks. Also make logic using it slightly more cautious in some places.
Reinstate 400 thread limit for 256MB.
Fix limiting to integer.max (cast in wrong place)
Get rid of ancient back compat code.
Merge branch 'next' into centralise-memory-limit-hacks

Conflicts:
	src/freenet/node/NodeClientCore.java
Fix logging string re memory
Expand the datastore size calculation to make it more obvious what we are doing.
Explain (comments)
Allow 50% of available memory for slot filters, not 80%.
Add a few more options for datastore size.
Tweak thresholds for default thread limit. I do think we want the 400 thread limit for low memory, but not for the default of just under 256MB (Java always allocates a chunk for itself so we see less than 256).