RF-13706: Re-worked the removeStaleEntriesFromQueue method to stop the timer for removed entries
RF-13706: Added a test for the removal of stale entries, and fixed the problem that QUnitTest executed each test multiple times