Intelligently enable KyotoCabinet's in-built defragging
Don't let freeMemoryIfNeeded() block writes if we're using NDS

It's a nasty, nasty corner case where if we're doing a big write (or a
defrag/snapshot), we can very easily end up blocking writes for far, far too
long.
Add lmdb as an external dep (2d6aed75)
Switch NDS from KyotoCabinet to LightningDB

Turns out KC's handling of deleted space is... well, painful.  LMDB promises
magic and fairies, and that's enough for me.
New command: NDS MEMKEYS

Only list those keys that are in memory.  This can be just as much of a bottleneck
as KEYS *, so don't use it indiscriminately.
Initialise server.mdb_env on startup

That's a quite a fine idea.
A number of fixes to the NDS LMDB support

Fix multi-writer deadlocks, stupidly long flush cycles, and other things.
Print the number of keys in the NDS store in 'info keyspace'
Take a far more pragmatic approach to nuking all keys in NDS
Handle a couple of big error conditions

* Keys can be no more than 511 octets.  At the moment we silently ignore any
  operation on a key over that length, which is a terrible idea, but baby
  steps... I'll chuck out a proper error later.

* Commit transactions regularly during flush.  MDB has maximum transaction
  sizes, but isn't real good on making sure you know how far you can go.  So
  we stay paranoid and commit early and commit often.
Add a warning about NDS and long keys to README.nds
Fix build failure
Don't return -1 from keyCountNDS on error, it isn't polite
Stat the correct thing to get the real key count
Make sure server.mdb_env is valid before we try an mdb_env_copy

Fixes a corner-case segfault when doing an nds snapshot.
Ensure server.nds_bg_requestor is NULL on startup
Add a lot more things per transaction

This improves flush performance by about 33%, and I'm more than 67% sure it won't farque
up anything.
Audit all uses of nds_bg_requestor and make sure they're properly guarded
Double the size of the MDB map

We're seeing MAP FULL failures in production; clearly 1MB per key isn't enough.
If this doesn't work, I'll have to start adding up the size of all the keys
and values to be flushed... ugh.