synced SecondsBasedEntryTaskScheduler with master
Fix leaking empty concurrent hashmaps

(cherry picked from commit 2fe8ffcc2bd5c4bef4dca956be82315a5cc088f8)
2343 - extracted cleanup to function

(cherry picked from commit 16c3c84b79e48e3d9646260437a18682848f34a7)
2343 - checkstyle fix

(cherry picked from commit 8ac6d0509c4e3b591e49ecde4b1621926108539c)
2343 - fix comment

(cherry picked from commit f0e457f8555f7e4a080644760d90e740123d46d3)
2343 - code review comments from bturner

(cherry picked from commit 657170ef08204337def0cbd6faf5197b7417e0c7)
Merge pull request #2967 from mdogan/fix/3.2/mem-leak

[Backport] Fix leaking empty concurrent hashmaps (#2929) to maintenance