Redis: Added a lock in the event loop before reading the earliestTimeout...

.... Also improved the timeout test case
Shouldn't we use an std::atomic<double> for that instead?