pubsub: Return integers for NUMSUB, not strings

Also adds test for numsub — due to tcl being tcl,
it doesn't capture the "numberness" of the fix,
but now we at least have one test case for numsub.

Closes #1561
Avoid unnecessary decoding in ziplist.c

Closes #1519
Avoid slave loading RDB on startup

The replica instance will immediately sync with a master anyway,
so we don't need to load anything from disk.

If we add support for PSYNC after instance restart, we will
need different logic here anyway.

Closes #1543
Improve accuracy of HAVE_ATOMIC dependency check

[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
Remove redundant event loop fd processing

Reason:
https://github.com/antirez/redis/pull/1450#issuecomment-30432925

Closes #1450
Reject MOVE to non-integer DBs

Previously, "MOVE key somestring" would move the key to
DB 0 which is just unexpected and wrong.
String as DB == error.

Test added too.

Fixes #1428
Remove always-true condition check

Closes #1376
Free memory in clusterLoadConfig error handler

Closes #1327
Fix keytable size calculation

We only need to allocate memory for key positions, not
for every argument position.  The most keys we can have
is total arguments / keystep.

Closes #1300
redis-check-dump: Prevent segfault if can't malloc

Found by The Mayhem Team (Alexandre Rebert, Thanassis Avgerinos,
Sang Kil Cha, David Brumley, Manuel Egele) Cylab, Carnegie Mellon
University. See http://bugs.debian.org/716259 for more.

Signed-off-by: Chris Lamb <lamby@debian.org>

Fixes #1191
Add redis-benchmark PUBLISH test

Closes #1186
Cleanup double semicolons

Closes #1161
Remove unused LINE_BUFLEN definition

Closes #1129
Remove duplicate prototypes in redis.h

Also moves acceptHandler() to be near the other accept...() functions.

Closes #1105
Use resolv library in Solaris

For some Solaris flavours, the inet_aton in in resolv library.
Not linking this library will introduce link error.

Improves compatability with older Solaris and still
works on new Solaris.

Closes #1092
Define AR to help with lua cross-compilation

Closes #997
va_copy must be matched by va_end

Hat tip to @rfuchs. See: https://github.com/redis/hiredis/pull/178.

Fixes #1187
Use unsigned length in sds header

People have reported redis-cli segfaults because
of large sds allocations.

[Additional fixes by matt:
  - add the unsigned storage class to sds in hiredis
  - convert sdsIncrLen from int to long so assert works]

All tests pass.

Fixes #1188
Refactor cluster flag printing

Less copy/paste code duplication.

Closes #952
Clarify existing slot wording on cluster start