Update memory peak stats while loading RDB / AOF.
Fix compilation on Linux kernels or glibc versions lacking sync_file_range().

This fixes issue #667.

Many thanks to Didier Spezia for the fix.
patch config.h for sync_file_range
Marginally more robust glibc version test for sync_file_range detection.
Ctrl+w support in linenoise.
help.h update (adds bitop, bitcount, evalsha...)
No longer used macro rdbIsOpcode() removed.
Invert two sides of if expression in SET to avoid a lookup.

Because of the short circuit behavior of && inverting the two sides of
the if expression avoids an hash table lookup if the non-EX variant of
SET is called.

Thanks to Weibin Yao (@yaoweibin on github) for spotting this.
fix a typo in a comment
32 bit build fixed on Linux.

It failed because of the way jemalloc was compiled (without passing the
right flags to make, but just to configure). Now the same set of flags
are also passed to the make command, fixing the issue.

This fixes issue #744
Unix socket clients properly displayed in MONITOR and CLIENT LIST.

This also fixes issue #745.
fix typo in comments (redis.c, networking.c)
More robust handling of AOF rewrite child.

After the wait3() syscall we used to do something like that:

    if (pid == server.rdb_child_pid) {
        backgroundSaveDoneHandler(exitcode,bysignal);
    } else {
        ....
    }

So the AOF rewrite was handled in the else branch without actually
checking if the pid really matches. This commit makes the check explicit
and logs at WARNING level if the pid returned by wait3() does not match
neither the RDB or AOF rewrite child.
fix a typo in redis.h line 595 comment
Type mismatch errors are now prefixed with WRONGTYPE.

So instead to reply with a generic error like:

-ERR ... wrong kind of value ...

now it replies with:

-WRONGTYPE ... wrong kind of value ...

This makes this particular error easy to check without resorting to
(fragile) pattern matching of the error string (however the error string
used to be consistent already).

Client libraries should return a specific exeption type for this error.

Most of the commit is about fixing unit tests.
BSD license added to every C source and header file.
Make clear that contributing code to the Redis project means to release it under the terms of the BSD license.
Copyright date fixed in COPYING file.
TTL API change: TTL returns -2 for non existing keys.

The previous behavior was to return -1 if:

1) Existing key but without an expire set.
2) Non existing key.

Now the second case is handled in a different, and TTL will return -2
if the key does not exist at all.

PTTL follows the same behavior as well.
zmalloc: kill unused __size parameter in update_zmalloc_stat_alloc() macro.