[MAJOR] ported appsession to use mempools v2

Also during this process, a bug was found in appsession_refresh().
It would not automatically requeue the task in the queue, so the
old sessions would not vanish.
4 files changed