Fix AddressSanitizer support for the common library.
Rework ApplicationPool2 object life time behavior.

Processes, Groups and SuperGroups must now be explicitly shut down
instead of putting shutdown behavior in the destructor. SuperGroups
now always outlive Groups, Groups always outlive Processes and
Processes always outlive Sessions. This fixes a lot of resource
management problems.
Convert the detached processes checker timer into a thread.

This is the first in a series of commits to remove the dependency on
libev in ApplicationPool2. It turns out that using libev here results
in too many concurrency problems and deadlocks. Using threads is just
easier.
Convert the analytics collection timer into a thread.
Convert the Pool garbage collection timer into a thread.
Bug fixes
Add unit tests for the recent ApplicationPool2 life time behavior changes.