EventsLogCleaner: Don't use lambda to create tasks

When a task is created with a lambda expression, only the run() method
of the Runnable interface is overridden. There is no way to override
the toString method. This results in entries in the show-queue output
like:

  com.ericsson.gerrit.plugins.eventslog.sql.EventsLogCleaner$$Lambda$313/774278169@576ed135

which is not readable. There are two types of task being created in
this class, and from such an output format we can't tell which one is
in the queue.

Instead of using lambda expressions, define separate explicit classes
for each task, overriding the toString method.

Change-Id: I237a7711931ae23de6968e55214e9619437148c6
2 files changed