Undo slave-master handshake when SLAVEOF sets a new slave.

Issue #828 shows how Redis was not correctly undoing a non-blocking
connection attempt with the previous master when the master was set to a
new address using the SLAVEOF command.

This was also a result of lack of refactoring, so now there is a
function to cancel the non blocking handshake with the master.
The new function is now used when SLAVEOF NO ONE is called or when
SLAVEOF is used to set the master to a different address.
CLIENT GETNAME and CLIENT SETNAME introduced.

Sometimes it is much simpler to debug complex Redis installations if it
is possible to assign clients a name that is displayed in the CLIENT
LIST output.

This is the case, for example, for "leaked" connections. The ability to
provide a name to the client makes it quite trivial to understand what
is the part of the code implementing the client not releasing the
resources appropriately.

Behavior:

    CLIENT SETNAME: set a name for the client, or remove the current
                    name if an empty name is set.
    CLIENT GETNAME: get the current name, or a nil.
    CLIENT LIST: now displays the client name if any.

Thanks to Mark Gravell for pushing this idea forward.
Typo fixed, ASCI -> ASCII.
Tests for CLIENT GETNAME/SETNAME.
redis-cli: save an RDB dump from remote server to local file.
redis-cli prompt bug fix
redis-cli --rdb fails if server sends a ping

Redis pings slaves in "pre-synchronization stage" with newlines. (See
https://github.com/antirez/redis/blob/2.6.9/src/replication.c#L814)
However, redis-cli does not expect this - it sees the newline as the end
of the bulk length line, and ends up returning 0 as bulk the length.
This manifests as the following when running redis-cli:

    $ ./src/redis-cli --rdb some_file
    SYNC sent to master, writing 0 bytes to 'some_file'
    Transfer finished with success.

With this commit, we just ignore leading newlines while reading the bulk
length line.

To reproduce the problem, load enough data into Redis so that the
preparation of the RDB snapshot takes long enough for a ping to occur
while redis-cli is waiting for the data.
Always exit if connection fails.

This avoids unnecessary core dumps. Fixes antirez/redis#894
Merge pull request #893 from nparry/fix-redis-cli-rdb

redis-cli --rdb fails if server sends a ping
Fix an error reply for CLIENT command
Merge pull request #896 from bitterb/fix-client-command-error-message

Fix an error reply for CLIENT command
Merge pull request #895 from badboy/catch_con_error

redis-cli: always exit if connection fails.
Merge pull request #887 from charsyam/redis-cli-prompt

redis-cli prompt bug fix
Fixed many typos.
Slowlog: don't log EXEC but just the executed commands.

The Redis Slow Log always used to log the slow commands executed inside
a MULTI/EXEC block. However also EXEC was logged at the end, which is
perfectly useless.

Now EXEC is no longer logged and a test was added to test this behavior.

This fixes issue #759.
Clear server.shutdown_asap on failed shutdown.

When a SIGTERM is received Redis schedules a shutdown. However if it
fails to perform the shutdown it must be clear the shutdown_asap flag
otehrwise it will try again and again possibly making the server
unusable.
Whitelist SIGUSR1 to avoid auto-triggering errors.

This commit fixes issue #875 that was caused by the following events:

1) There is an active child doing BGSAVE.
2) flushall is called (or any other condition that makes Redis killing
the saving child process).
3) An error is sensed by Redis as the child exited with an error (killed
by a singal), that stops accepting write commands until a BGSAVE happens
to be executed with success.

Whitelisting SIGUSR1 and making sure Redis always uses this signal in
order to kill its own children fixes the issue.
Additionally two typos fixed thanks to @jodal
fix memory leakage of variable token
fix memory leakage of variable p