Avoid valgrind memory leak false positive in processInlineBuffer().

zmalloc(0) cauesd to actually trigger a non-zero allocation since with
standard libc malloc we have our own zmalloc header for memory tracking,
but at the same time the returned pointer is at the end of the block and
not in the middle. This triggers a false positive when testing with
valgrind.

When the inline protocol args count is 0, we now avoid reallocating
c->argv, preventing the issue to happen.
Merge remote-tracking branch 'origin/unstable' into unstable
Document redis-cli --stat in --help output.
Fix DEBUG OBJECT lru field to report seconds.

Because of (not so) recent Redis changes, now the LRU internally
reported unit is milliseconds, not seconds, but the DEBUG OBJECT output
was still claiming seconds while providing milliseconds.
However OBJECT IDLETIME was working as expected, which is the correct
API to use.
fix benchmark memleak in loop mode
Merge pull request #2169 from razzle/unstable

fix benchmark memleak in loop mode
redis-benchmark: default num of requests is now 100000.

10000 completes in a too short time and may easily provide unreliable
figures because of tiny duration.
Cluster PUBLISH message: fix totlen count.

bulk_data field size was not removed from the count. It is not possible
to declare it simply as 'char bulk_data[]' since the structure is nested
into another structure.
Test framework: exit on timeout with report.

There was no sane way to detect tests that may never end because of
Redis bugs or tests bugs.
Test: try to cleanup still running Redis instances on exit.

It's hard to run the Redis test continuously if it leaks processes on
exceptions / errors.
Test: wait for actual startup in start_server.

start_server now uses return value from Tcl exec to get the server pid,
however this introduces errors that depend from timing: a lot of the
testing code base assumed the server to be actually up and running when
server_start returns.

So the old code that waits to see the pid in the log file was restored.
Add addReplyBulkSds() function

Refactor a common pattern into one function so we don't
end up with copy/paste programming.
Add DEBUG JEMALLOC INFO

Uses jemalloc function malloc_stats_print() to return
stats about what jemalloc has allocated internally.
Remove ziplist compiler warnings

Only happen when compiled with the test define.
Allow all code tests to run using Redis args

Previously, many files had individual main() functions for testing,
but each required being compiled with their own testing flags.
That gets difficult when you have 8 different flags you need
to set just to run all tests (plus, some test files required
other files to be compiled aaginst them, and it seems some didn't
build at all without including the rest of Redis).

Now all individual test main() funcions are renamed to a test
function for the file itself and one global REDIS_TEST define enables
testing across the entire codebase.

Tests can now be run with:
  - `./redis-server test <test>`

  e.g. ./redis-server test ziplist

If REDIS_TEST is not defined, then no tests get included and no
tests are included in the final redis-server binary.
Add simple ll2string() tests
Allow forcing non-jemalloc build
Fix how zipEntry returns values

zipEntry was returning a struct, but that caused some
problems with tests under 32 bit builds.

The tests run better if we operate on structs allocated in the
caller without worrying about copying on return.
Fix ziplistDeleteRange index parameter

It's valid to delete from negative offsets, so we *don't*
want unsigned arguments here.
Fix ziplist test for pop()

The previous test wasn't returning the new ziplist, so the test
was invalid.  Now the test works properly.

These problems were simultaenously discovered in #2154 and that
PR also had an additional fix we included here.