dirmngr: Add a background task framework.