Add SCAN command
SCAN requires at least 1 argument
Fix error in scan algorithm

The irrelevant bits shouldn't be masked to 1. This can result in slots being
skipped when the hash table is resized between calls to the iterator.
SCAN option name changed: pattern -> match.
Fixed typo in SCAN comment. iff -> if.
SCAN: use define REDIS_LONGSTR_SIZE instead of fixed len.
SCAN: remove useless assertion, already enforced by command table.
SCAN: remove additional newlines to conform to Redis code base.
SCAN: improve variable names for readability.
SCAN: Fix test after option renamed from PATTERN to MATCH.
SCAN: simplify keys list cleanup using listSetFreeMethod().
Revert "Fixed typo in SCAN comment. iff -> if."

Probably here Pieter means "if and only if".

This reverts commit 43fdf3b404413f6e3b2c39ac491238c70ecee81c.
SCAN: stay inside 80 cols.
dictScan() algorithm documented.
Fixed typos in dictScan() comment.
SCAN: refactored into scanGenericCommand.

The new implementation is capable of iterating the keyspace but also
sets, hashes, and sorted sets, and can be used to implement SSCAN, ZSCAN
and HSCAN.
SCAN is a random command and does not require output sorting.

Sorting the output helps when we want to turn a non-deterministic into a
deterministic command, in that case this is not possible.
dictScan(): empty hash table requires special handling.
SSCAN implemented.
HSCAN implemented.