Only run the fast active expire cycle if master & enabled.
Update server.lastbgsave_status when fork() fails.
DEBUG SDSLEN added.

This command is only useful for low-level debugging of memory issues due
to sds wasting memory as empty buffer at the end of the string.
Don't over-allocate the sds string for large bulk requests.

The call to sdsMakeRoomFor() did not accounted for the amount of data
already present in the query buffer, resulting into over-allocation.
tryObjectEncoding(): don't call stringl2() for too big strings.

We are sure that a string that is longer than 21 chars cannot be
represented by a 64 bit signed integer, as -(2^64) is 21 chars:

strlen(-18446744073709551616) => 21
tryObjectEncoding(): optimize sds strings if possible.

When no encoding is possible, at least try to reallocate the sds string
with one that does not waste memory (with free space at the end of the
buffer) when the string is large enough.
Remove useful check from tryObjectEncoding().

We are sure the string is large, since when the sds optimization branch
is entered it means that it was not possible to encode it as EMBSTR for
size concerns.
Fix an hypothetical issue in processMultibulkBuffer().
fix lua_cmsgpack pack map as array
Fixed critical memory leak from EVAL.

Multiple missing calls to lua_pop prevented the error handler function
pushed on the stack for lua_pcall() to be popped before returning,
causing a memory leak in almost all the code paths of EVAL (both
successful calls and calls returning errors).

This caused two issues: Lua leaking memory (and this was very visible
from INFO memory output, as the 'used_memory_lua' field reported an
always increasing amount of memory used), and as a result slower and
slower GC cycles resulting in all the CPU being used.

Thanks to Tanguy Le Barzic for noticing something was wrong with his 2.8
slave, and for creating a testing EC2 environment where I was able to
investigate the issue.
Test: added a memory efficiency test.
Test: Lua stack leak regression test added.
Cluster: fixed a bug in clusterSendPublish() due to inverted statements.

The code used to copy the header *after* the 'hdr' pointer was already
switched to the new buffer. Of course we need to do the reverse.
Cluster: use non-blocking I/O for the cluster bus.
Cluster: clusterReadHandler() reworked to be more correct and simpler to follow.
A mistype fixed
mistype fixed
Cluster: always use safe iteartors to iterate server.cluster->nodes.
Cluster: don't save HANDSHAKE nodes in nodes.conf.
Cluster: CLUSTER SAVECONFIG command added.