Fix infinite loop in dbRandomKey().
Fix infinite loop in dbRandomKey().

Thanks to @kevinmcgehee for signaling the issue and reasoning about the
consequences and potential fixes.

Issue #5015.

JackieXie168/redis,JackieXie168/redis,JackieXie168/redis,JackieXie168/redis