cells: Orderly shutdown of multi-threaded cells

Cells used to have a single message delivery thread, but some years ago
this was extended to allows multi-threaded executors to be injected for
message delivery.

During shutdown, cells inject a LastMessageEvent. With a single message
delivery thread, delivery of the LastMessageEvent guarantees that no
further messages are processed. However in a multi-threaded setup, there
could be concurrent requests still being processed.

The consequence of the above is that the cell may proceed shutdown even
though messages are actively being processed. This in turn leads to all
kinds of errors as resources like database connection pools get closed
while still being used.

This patch resolves the issue by removing the LastMessageEvent. Instead
cells rely on shutdown of the message executor to ensure that no further
messages are going to be processed.

Also changed the point at which background tasks are stopped: We now no
longer execute them after the cell has been shut down.

Target: trunk
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/7375/