redis-check-dump: use names instead of magic nums

Use constants to avoid magic numbers in `types`, which is an array
that stores the names of `REDIS` types.

Closes #1681