[PATCH 6.7 336/353] pds_core: Rework teardown/setup flow to be more common