Use Redis to store the user storage if Redis is the cache
Using Redis avoids the fairly complex and deadlock prone
shutdown() function and thus improves performance and stability
in high traffic boards.
This patch deliberately avoids modifying any lines of the existing
MySQL based implementation, instead opting to only add if-guarded
code for the Redis implementation to ensure that no bugs are
accidentally introduced into the existing MySQL based user storage.
This Redis implementation has been tested in production for over
a year, with billions of commands processed, exposing not a single
bug.